Skip to content

Commit

Permalink
Refactor | #4 | @lcomment | api prefix 설정 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
lcomment committed May 10, 2024
1 parent 643be42 commit b483b1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.cakk.api.controller.user;

import jakarta.validation.Valid;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.RequiredArgsConstructor;
Expand All @@ -15,18 +16,21 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1")
public class SignController {

private final UserService userService;

@PostMapping("/sign-up")
public ApiResponse<JwtResponse> signUp(@RequestBody UserSignUpRequest request) {
public ApiResponse<JwtResponse> signUp(
@Valid @RequestBody UserSignUpRequest request
) {
return ApiResponse.success(userService.signUp(request));
}

@PostMapping("/sign-in")
public ApiResponse<JwtResponse> signIn(@RequestBody UserSignInRequest request) {
public ApiResponse<JwtResponse> signIn(
@Valid @RequestBody UserSignInRequest request
) {
return ApiResponse.success(userService.signIn(request));
}
}
8 changes: 4 additions & 4 deletions cakk-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
server:
servlet:
context-path: /api/v1

spring:
application:
title: Cakk
version: 1.0.0
banner:
location: classpath:/app-banner.dat
servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB
jpa:
open-in-view: false
hibernate:
Expand Down

0 comments on commit b483b1a

Please sign in to comment.