Skip to content

Commit

Permalink
[chore] : #8 mapper object 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
1971123-seongmin committed Nov 13, 2024
1 parent cb58a1f commit ace6aa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.sopt.and.data.remote.source

import org.sopt.and.domain.mapper.UserMapper
import org.sopt.and.domain.mapper.AuthMapper
import org.sopt.and.domain.model.user.LoginUserEntity
import org.sopt.and.domain.model.user.RegisterUserEntity
import org.sopt.and.domain.model.user.UserIdEntity
Expand All @@ -17,16 +17,16 @@ class AuthRepositoryImpl @Inject constructor(
override suspend fun registerUser(
userEntity: RegisterUserEntity
): Result<UserIdEntity> = runCatching {
val requestDto = UserMapper.mapperToUserRegisterRequestDto(userEntity)
val requestDto = AuthMapper.mapperToUserRegisterRequestDto(userEntity)
val response = authDataSource.registerUser(requestDto)
UserMapper.mapperToUserIdEntity(response.result)
AuthMapper.mapperToUserIdEntity(response.result)
}

override suspend fun loginUser(loginUserEntity: LoginUserEntity): Result<UserTokenEntity> =
runCatching {
val requestDto = UserMapper.mapperToUserLoginRequestDto(loginUserEntity)
val requestDto = AuthMapper.mapperToUserLoginRequestDto(loginUserEntity)
val response = authDataSource.loginUser(requestDto)
val tokenEntity = UserMapper.mapperToTUserTokenEntity(response.result)
val tokenEntity = AuthMapper.mapperToTUserTokenEntity(response.result)

tokenManager.saveToken(tokenEntity.token)
tokenEntity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.sopt.and.domain.model.user.RegisterUserEntity
import org.sopt.and.domain.model.user.UserIdEntity
import org.sopt.and.domain.model.user.UserTokenEntity

object UserMapper {
object AuthMapper {
fun mapperToUserRegisterRequestDto(entity: RegisterUserEntity) = UserRegisterRequestDto(
username = entity.username,
password = entity.password,
Expand Down

0 comments on commit ace6aa2

Please sign in to comment.