Skip to content

Commit

Permalink
Merge pull request #134 from 9uttery/fix/album-report-api-#133
Browse files Browse the repository at this point in the history
[Fix] 앨범 신고 시 isBlocked 값 변경
  • Loading branch information
hojeong2747 authored Feb 24, 2024
2 parents f0baf97 + 65790c2 commit 1ccfa81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,5 +293,6 @@ public void reportAlbum(AlbumReportRequest albumReportRequest, Long albumId, Use

final Report report = Report.createReport(user, album, albumReportRequest.contents());
reportRepository.save(report);
album.makeBlocked();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ public void makePersonal() {
this.albumStatus = this.albumStatus.withOfficial(false);
}

public void makeBlocked() {
this.albumStatus = this.albumStatus.withBlocked(true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ public AlbumStatus withOfficial(Boolean isOfficial) {
return new AlbumStatus(isOfficial, this.isBlocked, this.isDeleted);
}

public AlbumStatus withBlocked(Boolean isBlocked) {
return new AlbumStatus(this.isOfficial, isBlocked, this.isDeleted);
}

}

0 comments on commit 1ccfa81

Please sign in to comment.