Skip to content

Commit

Permalink
HOTFIX: 출석체크 CORS 문제로 인해 RequestBody로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Aug 11, 2024
1 parent ff0b981 commit fe5065c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ public record Response(
LocalDateTime end,
String location
) {}

public record CheckIn(
Integer code
) {}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package leets.weeth.domain.attendance.presentation;

import leets.weeth.domain.attendance.application.dto.AttendanceDTO;
import leets.weeth.domain.attendance.application.usecase.AttendanceUseCase;
import leets.weeth.global.auth.annotation.CurrentUser;
import leets.weeth.global.common.error.exception.custom.AttendanceCodeMismatchException;
Expand All @@ -17,8 +18,8 @@ public class AttendanceController {
private final AttendanceUseCase attendanceUseCase;

@PatchMapping
public CommonResponse<Void> checkIn(@CurrentUser Long userId, @RequestParam Integer code) throws AttendanceCodeMismatchException {
attendanceUseCase.checkIn(userId, code);
public CommonResponse<Void> checkIn(@CurrentUser Long userId, @RequestBody AttendanceDTO.CheckIn checkIn) throws AttendanceCodeMismatchException {
attendanceUseCase.checkIn(userId, checkIn.code());
return CommonResponse.createSuccess();
}

Expand Down

0 comments on commit fe5065c

Please sign in to comment.