Skip to content

Commit

Permalink
fix: 쿠키 null 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
nuyh99 committed Jan 3, 2024
1 parent e036a4e commit ce6e8d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/static/api/openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ paths:
현재 유저 정보 조회하기:
value: "{\"name\":\"연어\",\"phone\":\"01012341234\",\"email\":\"\
[email protected]\",\"role\":\"USER\",\"company\":\"우형\",\"region\"\
:\"BUSAN\",\"createdAt\":\"2024-01-03T18:43:32.259641\"}"
:\"BUSAN\",\"createdAt\":\"2024-01-03T18:48:37.69014\"}"
post:
tags:
- members
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ce6e8d1

Please sign in to comment.