Skip to content

Commit

Permalink
Merge pull request #61 from PizzaPickle/fix/strategy-create-ratio-type
Browse files Browse the repository at this point in the history
fix: dto ratio타입 entity와 동일하게 double로 변경
  • Loading branch information
OneK-2 authored Sep 10, 2024
2 parents a919315 + 853744f commit e1947f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static class CategoryDto {
private String category;

@Positive
private int categoryRatio;
private double categoryRatio;

private List<@Valid ProductDto> productList;
}
Expand All @@ -48,7 +48,7 @@ public static class ProductDto {
private String name;

@Positive
private int ratio;
private double ratio;

@NotBlank
private String themeName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,4 +390,22 @@ protected ResponseEntity<?> handleDuplicateUserIdException(DuplicateUserIdExcept

}

@ExceptionHandler(UnauthorizedStrategyException.class)
protected ResponseEntity<?> handleUnauthorizedStrategyException(UnauthorizedStrategyException exception){
log.error("handleUnauthorizedStrategyException :: ");
ErrorCode errorCode = ErrorCode.UNAUTHORIZED_STRATEGY_EXCEPTION;
ErrorResponse error = ErrorResponse.builder()
.status(errorCode.getStatus().value())
.message(errorCode.getMessage())
.code(errorCode.getCode())
.build();

CommonResponse response = CommonResponse.builder()
.success(false)
.error(error)
.build();

return new ResponseEntity<>(response, errorCode.getStatus());
}

}

0 comments on commit e1947f1

Please sign in to comment.