Skip to content

Commit

Permalink
feat: 회원가입 성공시 권한 업그레이드
Browse files Browse the repository at this point in the history
  • Loading branch information
rhkrwngud445 committed Apr 3, 2024
1 parent e54db4a commit a45f138
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.withpeace.withpeace.core.domain.model.WithPeaceError
import com.withpeace.withpeace.core.domain.model.profile.ChangedProfile
import com.withpeace.withpeace.core.domain.model.profile.Nickname
import com.withpeace.withpeace.core.domain.model.profile.ProfileInfo
import com.withpeace.withpeace.core.domain.model.role.Role
import com.withpeace.withpeace.core.domain.repository.UserRepository
import com.withpeace.withpeace.core.network.di.common.getErrorBody
import com.withpeace.withpeace.core.network.di.request.NicknameRequest
Expand Down Expand Up @@ -70,6 +71,7 @@ class DefaultUserRepository @Inject constructor(

request.suspendMapSuccess {
val data = this.data
userPreferenceDataSource.updateUserRole(Role.USER.name)
tokenPreferenceDataSource.updateAccessToken(data.accessToken)
tokenPreferenceDataSource.updateRefreshToken(data.refreshToken)
emit(Unit)
Expand Down

0 comments on commit a45f138

Please sign in to comment.