diff --git a/SodaLive/Sources/App/AppViewModel.swift b/SodaLive/Sources/App/AppViewModel.swift index 2d13d32..36f2536 100644 --- a/SodaLive/Sources/App/AppViewModel.swift +++ b/SodaLive/Sources/App/AppViewModel.swift @@ -71,6 +71,7 @@ final class AppViewModel: ObservableObject { if let data = decoded.data, decoded.success { UserDefaults.set(data.can, forKey: .can) + UserDefaults.set(data.point, forKey: .point) UserDefaults.set(data.isAuth, forKey: .auth) UserDefaults.set(data.role.rawValue, forKey: .role) UserDefaults.set(data.auditionNotice ?? false, forKey: .isAuditionNotification) diff --git a/SodaLive/Sources/Extensions/UserDefaultsExtension.swift b/SodaLive/Sources/Extensions/UserDefaultsExtension.swift index 126dd7b..05130cc 100644 --- a/SodaLive/Sources/Extensions/UserDefaultsExtension.swift +++ b/SodaLive/Sources/Extensions/UserDefaultsExtension.swift @@ -11,6 +11,7 @@ enum UserDefaultsKey: String, CaseIterable { case auth case role case can + case point case token case email case userId diff --git a/SodaLive/Sources/Main/Home/HomeViewModel.swift b/SodaLive/Sources/Main/Home/HomeViewModel.swift index 3c136c5..a010eab 100644 --- a/SodaLive/Sources/Main/Home/HomeViewModel.swift +++ b/SodaLive/Sources/Main/Home/HomeViewModel.swift @@ -68,6 +68,7 @@ final class HomeViewModel: ObservableObject { if let data = decoded.data, decoded.success { UserDefaults.set(data.can, forKey: .can) + UserDefaults.set(data.point, forKey: .point) UserDefaults.set(data.isAuth, forKey: .auth) UserDefaults.set(data.role.rawValue, forKey: .role) UserDefaults.set(data.auditionNotice ?? false, forKey: .isAuditionNotification) diff --git a/SodaLive/Sources/Settings/Notification/GetMemberInfoResponse.swift b/SodaLive/Sources/Settings/Notification/GetMemberInfoResponse.swift index 894cd85..2ff895e 100644 --- a/SodaLive/Sources/Settings/Notification/GetMemberInfoResponse.swift +++ b/SodaLive/Sources/Settings/Notification/GetMemberInfoResponse.swift @@ -13,6 +13,7 @@ enum MemberRole: String, Decodable { struct GetMemberInfoResponse: Decodable { let can: Int + let point: Int let isAuth: Bool let gender: String? let signupDate: String