Skip to content

Commit c078e50

Browse files
authored
Merge pull request #51 from team-fontory/hotfix
Hotfix
2 parents c30f862 + c552c60 commit c078e50

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/main/java/org/fontory/fontorybe/member/controller/ProfileController.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.fontory.fontorybe.authentication.adapter.inbound.annotation.Login;
1111
import org.fontory.fontorybe.authentication.application.AuthService;
1212
import org.fontory.fontorybe.authentication.domain.UserPrincipal;
13-
import org.fontory.fontorybe.authentication.domain.exception.AuthenticationRequiredException;
1413
import org.fontory.fontorybe.file.application.port.CloudStorageService;
1514
import org.fontory.fontorybe.file.application.port.FileService;
1615
import org.fontory.fontorybe.file.domain.FileUploadResult;
@@ -21,6 +20,7 @@
2120
import org.fontory.fontorybe.member.controller.port.MemberLookupService;
2221
import org.fontory.fontorybe.member.controller.port.MemberUpdateService;
2322
import org.fontory.fontorybe.member.domain.Member;
23+
import org.fontory.fontorybe.member.domain.exception.MemberNotFoundException;
2424
import org.fontory.fontorybe.member.infrastructure.entity.MemberStatus;
2525
import org.springframework.http.HttpStatus;
2626
import org.springframework.http.ResponseEntity;
@@ -51,13 +51,18 @@ public class ProfileController {
5151
)
5252
@GetMapping
5353
public ResponseEntity<MyProfileResponse> getMyProfile(
54-
@Login UserPrincipal me) {
54+
@Login(required = false) UserPrincipal me) {
55+
if (me == null) {
56+
log.info("Request received: getMyInfo - no login");
57+
throw new MemberNotFoundException();
58+
}
5559
Long requestMemberId = me.getId();
5660
log.info("Request received: getMyInfo member ID: {}", requestMemberId);
5761

5862
Member lookupMember = memberLookupService.getOrThrowById(requestMemberId);
5963
if (lookupMember.getStatus().equals(MemberStatus.ONBOARDING)) {
60-
throw new AuthenticationRequiredException();
64+
log.info("Request received: getMyInfo - member is onboarding");
65+
throw new MemberNotFoundException();
6166
}
6267
String fileUrl = cloudStorageService.getProfileImageUrl(lookupMember.getProfileImageKey());
6368
log.info("ProfileImageUrl generated : {}", fileUrl);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
spring.jpa.hibernate.ddl-auto=create
1+
spring.jpa.hibernate.ddl-auto=update
22

33
cookies.domain=.fontory.co.kr

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ api.server.url=http://localhost:8080
1313

1414
spring.config.import=optional:classpath:application-infrastructure.properties
1515
url.base=http://localhost
16-
url.path.signup=/signup
16+
url.path.signup=/signup/step-one
1717
url.path.auth=
1818
url.cdn=https://cdn.fontory.co.kr
1919

0 commit comments

Comments
 (0)