Skip to content

Commit

Permalink
Merge pull request #61 from TryOn-A-Virtual-Fitting-Service/develop
Browse files Browse the repository at this point in the history
[hotfix] change error handler and fitting model order
  • Loading branch information
givemethatsewon authored Dec 4, 2024
2 parents 5659a2c + 726c289 commit f7e83db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ResponseWidgetDto getWidgetInfo(RequestWidgetInfoDto requestWidgetInfoDto

private void validateGender(String gender) {
if (!MALE.equalsIgnoreCase(gender) && !FEMALE.equalsIgnoreCase(gender)) {
throw new IllegalArgumentException(ErrorStatus.GENDER_SETTING_NOT_FOUND.getMessage());
throw new UserExceptionHandler(ErrorStatus.GENDER_SETTING_NOT_FOUND);
}
}

Expand Down Expand Up @@ -76,6 +76,6 @@ private List<FittingModel> createDefaultFittingModels(String gender, User user)
secondaryModel = FittingModelConverter.toEntity(DefaultModelUrl.MALE_MODEL.getUrl(), user);
}

return List.of(primaryModel, secondaryModel);
return List.of(secondaryModel, primaryModel); // make primary model to display first (save in second time)
}
}

0 comments on commit f7e83db

Please sign in to comment.