-
Notifications
You must be signed in to change notification settings - Fork 3
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' into feature/#8-upload-image
- Loading branch information
Showing
48 changed files
with
5,678 additions
and
1,127 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
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
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
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
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
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
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,11 @@ | ||
package com.moabam.api.dto; | ||
|
||
import com.moabam.api.domain.entity.enums.Role; | ||
|
||
public record AuthorizationMember( | ||
Long id, | ||
String nickname, | ||
Role role | ||
) { | ||
|
||
} |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
package com.moabam.api.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record LoginResponse( | ||
Long id, | ||
boolean isSignUp | ||
boolean isSignUp, | ||
@JsonUnwrapped PublicClaim publicClaim | ||
) { | ||
|
||
} |
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
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,43 @@ | ||
package com.moabam.api.dto; | ||
|
||
import static java.util.Objects.*; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.http.HttpMethod; | ||
|
||
import com.moabam.api.domain.entity.enums.Role; | ||
import com.moabam.global.common.handler.PathResolver; | ||
|
||
import jakarta.annotation.Nonnull; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class PathMapper { | ||
|
||
public static PathResolver.Path parsePath(String uri) { | ||
return parsePath(uri, null, null); | ||
} | ||
|
||
public static <T> PathResolver.Path parsePath(String uri, @Nonnull List<T> params) { | ||
if (!params.isEmpty() && params.get(0) instanceof Role) { | ||
return parsePath(uri, (List<Role>)params, null); | ||
} | ||
return parsePath(uri, null, (List<HttpMethod>)params); | ||
} | ||
|
||
private static PathResolver.Path parsePath(String uri, List<Role> roles, List<HttpMethod> methods) { | ||
PathResolver.Path.PathBuilder pathBuilder = PathResolver.Path.builder().uri(uri); | ||
|
||
if (nonNull(roles)) { | ||
pathBuilder.roles(roles); | ||
} | ||
|
||
if (nonNull(methods)) { | ||
pathBuilder.httpMethods(methods); | ||
} | ||
|
||
return pathBuilder.build(); | ||
} | ||
} |
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,15 @@ | ||
package com.moabam.api.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.moabam.api.domain.entity.enums.Role; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record PublicClaim( | ||
Long id, | ||
@JsonIgnore String nickname, | ||
@JsonIgnore Role role | ||
) { | ||
|
||
} |
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.