From 7ce5a36172657b40aecd50fac8a2963d6c5b04c0 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 17 Jan 2024 04:24:26 +0900 Subject: [PATCH] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=B3=80=EA=B2=BD=20-=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=B3=80=EA=B2=BD=EC=8B=9C=20=EB=A1=9C?= =?UTF-8?q?=EC=BB=AC=EC=97=90=20=EC=A0=80=EC=9E=A5=EB=90=9C=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20URL=EB=8F=84?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift b/SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift index da7f7e8..5f667d1 100644 --- a/SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift +++ b/SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift @@ -295,7 +295,8 @@ final class ProfileUpdateViewModel: ObservableObject { let jsonDecoder = JSONDecoder() let decoded = try jsonDecoder.decode(ApiResponse.self, from: responseData) - if let _ = decoded.data, decoded.success { + if let profileImageUrl = decoded.data, decoded.success { + UserDefaults.set(profileImageUrl, forKey: .profileImage) self.refresh() self.getMyProfile() } else {