251222_04_ENH : RequestBody에 Valid 적용 및 중괄호 스타일 통일
This commit is contained in:
@@ -6,6 +6,7 @@ import com.kri.contact.server.dto.LoginRequestDto;
|
||||
import com.kri.contact.server.dto.LoginResponseDto;
|
||||
import com.kri.contact.server.service.AuthService;
|
||||
import com.kri.contact.server.service.SystemEventLogService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -20,8 +21,9 @@ public class AuthController {
|
||||
private final AuthService authService;
|
||||
private final SystemEventLogService systemEventLogService;
|
||||
|
||||
@Operation(summary = "로그인 요청")
|
||||
@PostMapping("/login")
|
||||
public LoginResponseDto tryLogin(@RequestBody LoginRequestDto request, RequestUserContext ctx){
|
||||
public LoginResponseDto tryLogin(@RequestBody LoginRequestDto request, RequestUserContext ctx) {
|
||||
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
|
||||
LoginResponseDto response = authService.tryLogin(request);
|
||||
@@ -30,8 +32,9 @@ public class AuthController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@Operation(summary = "로그아웃 요청")
|
||||
@PostMapping("/logout/{userId}")
|
||||
public boolean logout(@PathVariable String userId, RequestUserContext ctx){
|
||||
public boolean logout(@PathVariable String userId, RequestUserContext ctx) {
|
||||
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
|
||||
systemEventLogService.writeLogoutLog(userId, now, ctx.getClientIp());
|
||||
|
||||
Reference in New Issue
Block a user