Skip to content

Commit

Permalink
refactor :: conflict dto
Browse files Browse the repository at this point in the history
  • Loading branch information
jyk1029 committed Jan 24, 2024
1 parent f41fd08 commit 2947880
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.example.boheom.domain.user.presentation.dto.request.SignInRequest
import com.example.boheom.domain.user.presentation.dto.request.SignUpRequest
import com.example.boheom.domain.user.presentation.dto.response.TokenResponse
import com.example.boheom.domain.user.presentation.dto.response.UploadProfileResponse
import com.example.boheom.domain.user.presentation.dto.response.UserInfoResponse
import com.example.boheom.domain.user.presentation.dto.response.UserElement
import com.example.boheom.domain.user.service.SignInService
import com.example.boheom.domain.user.service.SignUpService
import com.example.boheom.domain.user.service.UploadProfileService
Expand Down Expand Up @@ -45,7 +45,7 @@ class UserController(
}

@GetMapping
fun getUserInfo(): UserInfoResponse {
fun getUserInfo(): UserElement {
return userInfoService.execute()
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.example.boheom.domain.user.service

import com.example.boheom.domain.user.facade.UserFacade
import com.example.boheom.domain.user.presentation.dto.response.UserInfoResponse
import com.example.boheom.domain.user.presentation.dto.response.UserElement
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional

Expand All @@ -10,8 +10,8 @@ class UserInfoService(
private val userFacade: UserFacade,
) {
@Transactional(readOnly = true)
fun execute(): UserInfoResponse {
fun execute(): UserElement {
val user = userFacade.getCurrentUser()
return UserInfoResponse(user.nickname, user.accountId, user.profile)
return UserElement(user.profile, user.nickname, user.accountId)
}
}

0 comments on commit 2947880

Please sign in to comment.