From ce6e8d1bc645ac86545cb71b0dde9532e0a63663 Mon Sep 17 00:00:00 2001 From: nuyh Date: Wed, 3 Jan 2024 18:49:46 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BF=A0=ED=82=A4=20null=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/busan/auth/domain/AutoLoginManager.java | 7 ++++++- src/main/resources/static/api/openapi3.yaml | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/example/busan/auth/domain/AutoLoginManager.java b/src/main/java/com/example/busan/auth/domain/AutoLoginManager.java index bfccd56..5ce6f77 100644 --- a/src/main/java/com/example/busan/auth/domain/AutoLoginManager.java +++ b/src/main/java/com/example/busan/auth/domain/AutoLoginManager.java @@ -56,7 +56,12 @@ public Authentication getAuthentication(final HttpServletRequest request) { } private Cookie getAutoLoggedInCookie(final HttpServletRequest request) { - return Arrays.stream(request.getCookies()) + final Cookie[] cookies = request.getCookies(); + if (cookies == null) { + return null; + } + + return Arrays.stream(cookies) .filter(cookie -> cookie.getName().equals(AUTO_LOGIN_COOKIE_NAME)) .findAny() .orElse(null); diff --git a/src/main/resources/static/api/openapi3.yaml b/src/main/resources/static/api/openapi3.yaml index e983a7c..c24fd1d 100644 --- a/src/main/resources/static/api/openapi3.yaml +++ b/src/main/resources/static/api/openapi3.yaml @@ -155,7 +155,7 @@ paths: 현재 유저 정보 조회하기: value: "{\"name\":\"연어\",\"phone\":\"01012341234\",\"email\":\"\ test@naver.com\",\"role\":\"USER\",\"company\":\"우형\",\"region\"\ - :\"BUSAN\",\"createdAt\":\"2024-01-03T18:43:32.259641\"}" + :\"BUSAN\",\"createdAt\":\"2024-01-03T18:48:37.69014\"}" post: tags: - members @@ -280,13 +280,13 @@ paths: examples: 자신의 회의실 예약 목록 최신 순으로 보기: value: "[{\"id\":1,\"status\":\"RESERVED\",\"cancelReason\":null,\"\ - startTime\":\"2024-01-03T18:43:33.966951\",\"endTime\":\"2024-01-03T20:43:33.966958\"\ + startTime\":\"2024-01-03T18:48:39.439096\",\"endTime\":\"2024-01-03T20:48:39.439102\"\ ,\"name\":\"황재현\",\"phone\":\"01012341234\",\"reservedAt\":\"\ - 2024-01-03T18:43:33.966968\",\"roomId\":1,\"roomName\":\"대회의실\"\ + 2024-01-03T18:48:39.439111\",\"roomId\":1,\"roomName\":\"대회의실\"\ ,\"company\":\"요기요\"},{\"id\":2,\"status\":\"CANCELED\",\"cancelReason\"\ - :\"쓰기 싫어졌어요..\",\"startTime\":\"2024-01-03T18:43:33.966976\",\"\ - endTime\":\"2024-01-03T20:43:33.966978\",\"name\":\"황재현\",\"phone\"\ - :\"01012341234\",\"reservedAt\":\"2024-01-03T18:43:33.96698\"\ + :\"쓰기 싫어졌어요..\",\"startTime\":\"2024-01-03T18:48:39.439119\",\"\ + endTime\":\"2024-01-03T20:48:39.439121\",\"name\":\"황재현\",\"phone\"\ + :\"01012341234\",\"reservedAt\":\"2024-01-03T18:48:39.439123\"\ ,\"roomId\":1,\"roomName\":\"대회의실\",\"company\":\"토스뱅크\"}]" post: tags: