-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
프로필 이미지가 null일 경우 알림 전송에 실패하는 오류 해결 (#412)
* feat: 로그인 시 프로필 이미지를 null이 아닌 기본이미지로 세팅하는 기능 추가 * feat: 사용자 엔티티의 프로필 이미지에 널 불가 제약조건 추가 * feat: 알림 dto에 `@NonNull` 제약 조건 추가 * refactor: 알림 전송 성공 및 예외 발생 시 로그 추가 * refactor: 기본 프로필 이미지 조회 시 이름으로 조회하도록 변경 * feat: 로그인 시 기본이미지를 찾을 수 없으면 예외가 발생하는 기능 추가 * refactor: 프로필 이미지 경로 생성을 유틸 클래스에서 하도록 변경 * refactor: 기본 프로필 이미지 이름을 엔티티에서 관리하도록 변경 * fix: flyway 스크립트 수정 * refactor: 알림 dto에서 사용하는 `@NonNull`을 롬복의 어노테이션을 사용하도록 변경
- Loading branch information
1 parent
7189c23
commit 892e8c1
Showing
10 changed files
with
102 additions
and
14 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
12 changes: 12 additions & 0 deletions
12
...ang/src/main/java/com/ddang/ddang/notification/application/dto/CreateNotificationDto.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 |
---|---|---|
@@ -1,13 +1,25 @@ | ||
package com.ddang.ddang.notification.application.dto; | ||
|
||
import com.ddang.ddang.notification.domain.NotificationType; | ||
import lombok.NonNull; | ||
|
||
public record CreateNotificationDto( | ||
@NonNull | ||
NotificationType notificationType, | ||
|
||
@NonNull | ||
Long targetUserId, | ||
|
||
@NonNull | ||
String title, | ||
|
||
@NonNull | ||
String body, | ||
|
||
@NonNull | ||
String redirectUrl, | ||
|
||
@NonNull | ||
String image | ||
) { | ||
} |
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
2 changes: 2 additions & 0 deletions
2
backend/ddang/src/main/resources/db/migration/V13__alter_user_tables.sql
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,2 @@ | ||
UPDATE users SET profile_image_id = 1 WHERE profile_image_id is null; | ||
ALTER TABLE users MODIFY profile_image_id bigint NOT NULL; |
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