Skip to content

Commit

Permalink
* fix : get rid of multipart file reuqirement for default model
Browse files Browse the repository at this point in the history
  • Loading branch information
givemethatsewon committed Dec 9, 2024
1 parent 488908f commit 4c19f24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ public ApiResponseWrapper<ResponseFittingModelDto> uploadFittingModel(
@PostMapping("{deviceId}/default-model/{gender}")
public ApiResponseWrapper<ResponseFittingModelDto> uploadDefaultFittingModel(
@PathVariable("deviceId") @NotEmpty String deviceId,
@PathVariable("gender") @NotEmpty String gender,
@RequestPart("image") MultipartFile image
@PathVariable("gender") @NotEmpty String gender
) {
ResponseFittingModelDto responseFittingModelDto = fittingModelService.uploadDefaultFittingModel(deviceId, gender, image);
ResponseFittingModelDto responseFittingModelDto = fittingModelService.uploadDefaultFittingModel(deviceId, gender);
return ApiResponseWrapper.onSuccess(SuccessStatus.FILE_UPLOAD_OK, responseFittingModelDto);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ public ResponseFittingModelDto uploadFittingModel(String deviceId, MultipartFile
}

@Transactional
public ResponseFittingModelDto uploadDefaultFittingModel(String deviceId, String gender, MultipartFile image) {
validateImage(image);

public ResponseFittingModelDto uploadDefaultFittingModel(String deviceId, String gender) {
User user = findUserByDeviceId(deviceId);

FittingModel fittingModel;
Expand Down

0 comments on commit 4c19f24

Please sign in to comment.