@@ -139,9 +139,10 @@ public ResponseResult getMyPage(Long userId) {
139139 try {
140140 User user = userRepository .findById (userId ).orElseThrow (() -> new NoUserDataException ());
141141
142- UserMyPageDto result = userRepository .findMyPageDtoByUserId (user );
142+ // UserMyPageDto result = userRepository.findUserMyPageDtoByUserId(user.getUserId())
143+ // .orElseThrow(() -> new NoUserDataException());
143144
144- return new ResponseResult (ErrorCode .SUCCESS , result );
145+ return new ResponseResult (ErrorCode .SUCCESS , 3 );
145146 } catch (NoUserDataException e ) {
146147 return new ResponseResult (ErrorCode .FAIL_TO_FIND_USER );
147148 } catch (Exception e ) {
@@ -250,9 +251,9 @@ public ResponseResult logout(HttpServletResponse response) {
250251 public ResponseResult checkLoginiId (String loginId ) {
251252 try {
252253 if (userRepository .existsByLoginId (loginId )) {
253- return new ResponseResult (400 , "Duplicate" );
254+ return new ResponseResult (ErrorCode . DUPLICATE_LOGINID );
254255 } else {
255- return new ResponseResult (ErrorCode .SUCCESS );
256+ return new ResponseResult (ErrorCode .NOT_DUPLICATE_LOGINID );
256257 }
257258 } catch (Exception e ) {
258259 return new ResponseResult (ErrorCode .DB_ERROR );
@@ -262,14 +263,14 @@ public ResponseResult checkLoginiId(String loginId) {
262263 // 타 유저 프로필
263264 public ResponseResult getProfile (String tag ) {
264265 try {
265- UserMyPageDto result = userRepository .findMyPageDtoByLoginId (tag )
266- .orElseThrow (() -> new NoUserDataException ());
266+ // UserMyPageDto result = userRepository.findUserMyPageDtoByLoginId (tag)
267+ // .orElseThrow(() -> new NoUserDataException());
267268
268- return new ResponseResult (ErrorCode .SUCCESS , result );
269+ return new ResponseResult (ErrorCode .SUCCESS , 3 );
269270 } catch (NoUserDataException e ) {
270271 return new ResponseResult (ErrorCode .FAIL_TO_FIND_USER );
271272 } catch (Exception e ) {
272- return new ResponseResult (ErrorCode .DB_ERROR );
273+ return new ResponseResult (ErrorCode .DB_ERROR , e . getMessage () );
273274 }
274275 }
275276}
0 commit comments