-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/Stumeet/STUMEET-SERVER into …
…STMT-146-fix-file-upload
- Loading branch information
Showing
53 changed files
with
893 additions
and
75 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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/stumeet/server/common/auth/exception/IllegalKeyAlgorithmException.java
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,13 @@ | ||
package com.stumeet.server.common.auth.exception; | ||
|
||
import com.stumeet.server.common.response.ErrorCode; | ||
import org.springframework.security.core.AuthenticationException; | ||
|
||
public class IllegalKeyAlgorithmException extends AuthenticationException { | ||
private final ErrorCode errorCode; | ||
|
||
public IllegalKeyAlgorithmException(ErrorCode errorCode, Throwable cause) { | ||
super(errorCode.getMessage(), cause); | ||
this.errorCode = errorCode; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/stumeet/server/common/auth/exception/JwtInvalidSignatureException.java
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,16 @@ | ||
package com.stumeet.server.common.auth.exception; | ||
|
||
import com.stumeet.server.common.response.ErrorCode; | ||
import org.springframework.security.core.AuthenticationException; | ||
|
||
|
||
public class JwtInvalidSignatureException extends AuthenticationException { | ||
|
||
private final ErrorCode errorCode; | ||
|
||
public JwtInvalidSignatureException(ErrorCode errorCode, Throwable e) { | ||
super(errorCode.getMessage(), e); | ||
this.errorCode = errorCode; | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/stumeet/server/common/auth/exception/JwtTokenParsingException.java
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,13 @@ | ||
package com.stumeet.server.common.auth.exception; | ||
|
||
import com.stumeet.server.common.response.ErrorCode; | ||
import org.springframework.security.core.AuthenticationException; | ||
|
||
public class JwtTokenParsingException extends AuthenticationException { | ||
private final ErrorCode errorCode; | ||
|
||
public JwtTokenParsingException(ErrorCode errorCode, Throwable e) { | ||
super(errorCode.getMessage(), e); | ||
this.errorCode = errorCode; | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
src/main/java/com/stumeet/server/member/adapter/in/web/response/MemberProfileResponse.java
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.stumeet.server.member.adapter.in.web.response; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MemberProfileResponse( | ||
Long id, | ||
String image, | ||
String nickname, | ||
String region, | ||
String profession, | ||
String tier, | ||
double experience | ||
) { | ||
} |
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
21 changes: 21 additions & 0 deletions
21
src/main/java/com/stumeet/server/member/application/port/in/mapper/MemberUseCaseMapper.java
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,21 @@ | ||
package com.stumeet.server.member.application.port.in.mapper; | ||
|
||
import com.stumeet.server.member.adapter.in.web.response.MemberProfileResponse; | ||
import com.stumeet.server.member.domain.Member; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class MemberUseCaseMapper { | ||
|
||
public MemberProfileResponse toProfileResponse(Member member) { | ||
return MemberProfileResponse.builder() | ||
.id(member.getId()) | ||
.image(member.getImage()) | ||
.nickname(member.getName()) | ||
.region(member.getRegion()) | ||
.profession(member.getProfession().getName()) | ||
.tier(member.getLevel().getTier().getName()) | ||
.experience(member.getLevel().getExperience()) | ||
.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
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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/stumeet/server/study/adapter/in/web/StudyQueryApi.java
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,30 @@ | ||
package com.stumeet.server.study.adapter.in.web; | ||
|
||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
import com.stumeet.server.common.annotation.WebAdapter; | ||
import com.stumeet.server.common.model.ApiResponse; | ||
import com.stumeet.server.common.response.SuccessCode; | ||
import com.stumeet.server.study.adapter.in.web.response.StudyDetailResponse; | ||
import com.stumeet.server.study.application.port.in.StudyQueryUseCase; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@WebAdapter | ||
@RequestMapping("/api/v1/studies") | ||
@RequiredArgsConstructor | ||
public class StudyQueryApi { | ||
|
||
private final StudyQueryUseCase studyQueryUseCase; | ||
|
||
@GetMapping("/{id}") | ||
public ResponseEntity<ApiResponse<StudyDetailResponse>> getStudy( | ||
@PathVariable(name = "id") Long id | ||
) { | ||
StudyDetailResponse response = studyQueryUseCase.getStudyDetailById(id); | ||
return ResponseEntity.ok(ApiResponse.success(SuccessCode.GET_SUCCESS, response)); | ||
} | ||
} |
Oops, something went wrong.