-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/TEAM-MODDY/moddy-server …
…into feat/#233 # Conflicts: # src/main/java/com/moddy/server/controller/application/ApplicationRetrieveController.java # src/main/java/com/moddy/server/controller/designer/DesignerRegisterController.java # src/main/java/com/moddy/server/service/application/HairModelApplicationRetrieveService.java
- Loading branch information
Showing
21 changed files
with
401 additions
and
338 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
117 changes: 0 additions & 117 deletions
117
src/main/java/com/moddy/server/controller/application/ApplicationController.java
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
src/main/java/com/moddy/server/controller/application/ApplicationRegisterController.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,50 @@ | ||
package com.moddy.server.controller.application; | ||
|
||
import com.moddy.server.common.dto.ErrorResponse; | ||
import com.moddy.server.common.dto.SuccessNonDataResponse; | ||
import com.moddy.server.common.exception.enums.SuccessCode; | ||
import com.moddy.server.config.resolver.user.UserId; | ||
import com.moddy.server.controller.model.dto.request.ModelApplicationRequest; | ||
import com.moddy.server.service.application.HairModelApplicationRegisterService; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestPart; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@Tag(name = "Application Controller") | ||
@RequestMapping("/application") | ||
public class ApplicationRegisterController { | ||
|
||
private final HairModelApplicationRegisterService hairModelApplicationRegisterService; | ||
|
||
@Operation(summary = "[JWT] 모델 지원서 작성", description = "모델 지원서 작성 API입니다.") | ||
@ApiResponses({ | ||
@ApiResponse(responseCode = "200", description = "모델 지원서 작성 성공"), | ||
@ApiResponse(responseCode = "400", description = "인증 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | ||
@ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), | ||
}) | ||
@SecurityRequirement(name = "JWT Auth") | ||
@PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) | ||
public SuccessNonDataResponse submitModelApplication( | ||
@Parameter(hidden = true) @UserId Long modelId, | ||
@RequestPart(value = "modelImgUrl", required = false) MultipartFile modelImgUrl, | ||
@RequestPart(value = "applicationCaptureImgUrl", required = false) MultipartFile applicationCaptureImgUrl, | ||
@RequestPart(value = "applicationInfo") @Valid ModelApplicationRequest applicationInfo) { | ||
hairModelApplicationRegisterService.postApplication(modelId, modelImgUrl, applicationCaptureImgUrl, applicationInfo); | ||
return SuccessNonDataResponse.success(SuccessCode.CREATE_MODEL_APPLICATION_SUCCESS); | ||
} | ||
} |
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
Oops, something went wrong.