From 28d6a1e5f87e58003655002a4778227cd3c34b69 Mon Sep 17 00:00:00 2001 From: sungone <20200999@sungshin.ac.kr> Date: Thu, 23 Mar 2023 15:23:29 +0900 Subject: [PATCH] =?UTF-8?q?#3=20feat=20:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EB=B3=B4=EA=B8=B0=20->=20=EB=82=98=EC=9D=98=20=EC=9E=AC?= =?UTF-8?q?=EC=B9=98=20=ED=98=84=ED=99=A9=20=EB=A6=AC=EC=8A=A4=ED=8A=B8(?= =?UTF-8?q?=EC=B5=9C=EC=8B=A0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zatch/zatchserver/config/JwtAuthenticationFilter.java | 2 +- .../com/zatch/zatchserver/repository/JdbcUserRepository.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zatch/zatchserver/config/JwtAuthenticationFilter.java b/src/main/java/com/zatch/zatchserver/config/JwtAuthenticationFilter.java index 1e3331c..007a9b5 100644 --- a/src/main/java/com/zatch/zatchserver/config/JwtAuthenticationFilter.java +++ b/src/main/java/com/zatch/zatchserver/config/JwtAuthenticationFilter.java @@ -14,7 +14,7 @@ @Slf4j @RequiredArgsConstructor -@Component +//@Component public class JwtAuthenticationFilter extends OncePerRequestFilter { private final String AUTHORIZATION_PREFIX = "Bearer "; diff --git a/src/main/java/com/zatch/zatchserver/repository/JdbcUserRepository.java b/src/main/java/com/zatch/zatchserver/repository/JdbcUserRepository.java index 646a85d..b77899e 100644 --- a/src/main/java/com/zatch/zatchserver/repository/JdbcUserRepository.java +++ b/src/main/java/com/zatch/zatchserver/repository/JdbcUserRepository.java @@ -90,12 +90,12 @@ public Long modifyNickname(Long userId, String newNickname) { @Override public List> profile(Long userId) { try { - String sql = "SELECT nickname from user WHERE user_id = ?"; + String sql = "SELECT user.user_id, user.nickname, zatch.zatch_id FROM zatch.zatch LEFT JOIN zatch.user on zatch.user_id = user.user_id WHERE user.user_id = ? ORDER BY user.created_at DESC;"; Object[] params = {userId}; System.out.println("User's profile SQL select"); return jdbcTemplate.queryForList(sql, params); } catch (Exception e){ - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "User Email Not Found"); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "User Profile Not Found"); } }