-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from 9oormthon-univ/64-feature-child-post-api-…
…for-kakao-login 64 feature child post api for kakao login
- Loading branch information
Showing
7 changed files
with
73 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/com/example/mymoo/domain/child/controller/ChildController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.example.mymoo.domain.child.controller; | ||
|
||
import com.example.mymoo.domain.child.dto.request.ChildCreateRequestDto; | ||
import com.example.mymoo.domain.child.entity.Child; | ||
import com.example.mymoo.domain.child.service.ChildService; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
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 | ||
@RequestMapping("/api/v1/children") | ||
@RequiredArgsConstructor | ||
public class ChildController { | ||
private final ChildService childService; | ||
@Operation( | ||
summary = "[공통] 아동 추가 회원가입 및 후원자 계정(기본)에서 아동 계정으로 권한 변경", | ||
description = "아동 추가 회원가입입니다.", | ||
responses = { | ||
@ApiResponse(responseCode = "201", description = "아동 추가 회원가입 성공"), | ||
} | ||
) | ||
@PostMapping("/signup") | ||
public ResponseEntity<Void> createChild( | ||
@Valid @RequestBody ChildCreateRequestDto request | ||
) { | ||
childService.createChild( | ||
request.accountId(), | ||
request.cardNumber(), | ||
request.Do(), | ||
request.sigun(), | ||
request.gu() | ||
); | ||
return ResponseEntity | ||
.status(HttpStatus.CREATED) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
src/main/java/com/example/mymoo/domain/child/dto/response/ChildResponseDTO.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/main/java/com/example/mymoo/domain/child/service/ChildService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters