Skip to content

Commit

Permalink
feat: 로그인 api controller 구현 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
gardening-y committed Jan 7, 2024
1 parent 8beeb9c commit 8cd298c
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.doorip.user.api;

import lombok.RequiredArgsConstructor;
import org.doorip.common.ApiResponse;
import org.doorip.common.ApiResponseUtil;
import org.doorip.message.SuccessMessage;
import org.doorip.user.dto.request.UserSignInRequest;
import org.doorip.user.dto.response.UserResponse;
import org.doorip.user.service.UserService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RequiredArgsConstructor
@RequestMapping("/api/users")
@RestController
public class UserApiController {
private final UserService userService;

@PostMapping("/signin")
public ResponseEntity<ApiResponse<?>> signIn(@RequestHeader("Authorization") final String token,
@RequestParam final UserSignInRequest request) {
final UserResponse response = userService.signIn(token, request);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}
}

0 comments on commit 8cd298c

Please sign in to comment.