Skip to content

Commit

Permalink
✨ [Feat] (#6) UserController 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
seonyo committed May 11, 2024
1 parent 6fa465f commit d9898c4
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 com.MtoM.MtoM.domain.user.controller;

import com.MtoM.MtoM.domain.user.dto.RegisterRequestDto;
import com.MtoM.MtoM.domain.user.service.UserService;
import lombok.RequiredArgsConstructor;
import org.apache.coyote.Response;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
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;

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

@PostMapping
public ResponseEntity<String> registerUser(@RequestBody RegisterRequestDto requestDto){
userService.registerUser(requestDto);
return ResponseEntity.status(HttpStatus.CREATED).body("회원가입에 성공했습니다");
}
}

0 comments on commit d9898c4

Please sign in to comment.