-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from EFUB4-Jukebox/develop
[Deploy] 배포 v0.6.7 - 신고 메일 전송 API 구현
- Loading branch information
Showing
9 changed files
with
199 additions
and
18 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
2 changes: 1 addition & 1 deletion
2
...n/member/dto/request/EmailRequestDto.java → ...pin/domain/email/dto/EmailRequestDto.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
12 changes: 12 additions & 0 deletions
12
src/main/java/sws/songpin/domain/email/dto/ReportRequestDto.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,12 @@ | ||
package sws.songpin.domain.email.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import sws.songpin.domain.model.ReportType; | ||
|
||
public record ReportRequestDto( | ||
@NotNull Long reportedId, | ||
@NotNull ReportType reportType, | ||
@Size(max = 200) String reason | ||
) { | ||
} |
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,31 @@ | ||
package sws.songpin.domain.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import sws.songpin.global.exception.CustomException; | ||
import sws.songpin.global.exception.ErrorCode; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum ReportType { | ||
|
||
SPAM("스팸/홍보"), | ||
FLOODING("도배"), | ||
ABUSE("욕설/비방"), | ||
DOXXING("개인정보 노출"), | ||
OFFENSIVE("불쾌감 조성"), | ||
OTHER("기타") | ||
; | ||
|
||
private final String message; | ||
|
||
@JsonCreator | ||
public static ReportType from(String s) { | ||
try { | ||
return ReportType.valueOf(s.toUpperCase()); | ||
} catch (IllegalArgumentException e) { | ||
throw new CustomException(ErrorCode.INVALID_ENUM_VALUE); | ||
} | ||
} | ||
} |
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,66 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko" style="box-sizing: border-box;"> | ||
<head style="box-sizing: border-box;"> | ||
<meta charset="UTF-8" style="box-sizing: border-box;"> | ||
<title style="box-sizing: border-box;">Songpin Mail</title> | ||
<link href="https://fonts.googleapis.com/css?family=Inter&display=swap" rel="stylesheet" style="box-sizing: border-box;"> | ||
</head> | ||
<body style="margin: 0; padding: 0; font-family: 'Inter', sans-serif; background-color: #f4f4f4;"> | ||
|
||
<div style="width: 700px; margin: 0 auto; padding: 20px;"> | ||
<table style="width: 100%; border-collapse: collapse; background-color: #ffffff; box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden;"> | ||
<tr> | ||
<td colspan="5" style="text-align: center; padding: 20px; background-color: #4CAF50;"> | ||
<img src="cid:logo" alt="logo" style="max-width: 150px; height: auto;"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="padding: 40px; text-align: center;"> | ||
<h2 style="font-size: 18px; color: #333333; margin-bottom: 10px;">유저 신고 보고서</h2> | ||
<p style="font-size: 14px; color: #555555; margin-bottom: 30px;">아래는 유저 신고의 세부 정보입니다:</p> | ||
<table style="width: 100%; border-collapse: collapse;"> | ||
<tr> | ||
<td style="width: 300px; padding: 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee;"> | ||
<strong>신고자 ID:</strong> | ||
</td> | ||
<td style="padding: 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee;" th:text="${reporterId}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="width: 300px; padding: 15px; background-color: #ffffff; border-bottom: 1px solid #eeeeee;"> | ||
<strong>신고된 ID:</strong> | ||
</td> | ||
<td style="padding: 15px; background-color: #ffffff; border-bottom: 1px solid #eeeeee;" th:text="${reportedId}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="width: 300px; padding: 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee;"> | ||
<strong>신고 시간:</strong> | ||
</td> | ||
<td style="padding: 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee;" th:text="${reportTime}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="width: 300px; padding: 15px; background-color: #ffffff; border-bottom: 1px solid #eeeeee;"> | ||
<strong>신고 유형:</strong> | ||
</td> | ||
<td style="padding: 15px; background-color: #ffffff; border-bottom: 1px solid #eeeeee;" th:text="${reportType}"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="width: 300px; padding: 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee;"> | ||
<strong>신고 사유:</strong> | ||
</td> | ||
<td style="padding: 25px 15px; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee; height: auto; word-wrap: break-word; max-width: 500px;" th:text="${reason}"> | ||
</td> | ||
</tr> | ||
</table> | ||
<div style="margin-top: 30px;"> | ||
<a th:href="${reportedUrl}" style="padding: 12px 25px; background-color: #4CAF50; color: #ffffff; text-decoration: none; border-radius: 5px; font-weight: bold; display: inline-block;">신고된 사용자 프로필로 이동</a> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |