Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public enum Whitelist {
EXAM_ALL("/api/v1/exam/all", WhitelistMethod.GET),

//USER find-id
USER_FIND_ID("/api/v1/user/find-id", WhitelistMethod.POST),
USER_FIND_ID("/api/v1/user/me/find-id", WhitelistMethod.POST),
//USER find-password
USER_FIND_PASSWORD("/api/v1/user/find-password", WhitelistMethod.POST),
USER_FIND_PASSWORD("/api/v1/user/me/find-password", WhitelistMethod.POST),
Comment on lines +50 to +52

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability, consider extracting the common API path prefix /api/v1 into a constant. This prefix is used across all enum values in this file.

You could define a constant within the enum:

private static final String API_V1_PREFIX = "/api/v1";

And then use it for all paths:

// ...
USER_FIND_ID(API_V1_PREFIX + "/user/me/find-id", WhitelistMethod.POST),
// ...

This will make it easier to manage API versions in the future.


APPLICATION_GUEST("/api/v1/applications/guest", WhitelistMethod.ALL);
private final String path;
private final WhitelistMethod method;
Expand Down