Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class NoteMarkAsReadService implements NoteMarkAsReadUseCase {
public void noteMarkAsRead(Long noteId) {
Note note = getNote(noteId);
note.markAsRead();
noteRepository.save(note);
}

private Note getNote(Long noteId) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/somemore/note/service/NoteQueryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public Page<NoteReceiverViewForVolunteer> getNotesForVolunteer(UUID volunteerId,
return noteRepository.findNotesByReceiverIsVolunteer(volunteerId, pageable);
}

@Transactional
@Override
public NoteDetailViewForCenter getNoteDetailForCenter(Long noteId) {
noteMarkAsReadUseCase.noteMarkAsRead(noteId);
Expand All @@ -44,6 +45,7 @@ public NoteDetailViewForCenter getNoteDetailForCenter(Long noteId) {
.orElseThrow(() -> new NoSuchElementException(NOT_EXISTS_NOTE));
}

@Transactional
@Override
public NoteDetailViewForVolunteer getNoteDetailForVolunteer(Long noteId) {
noteMarkAsReadUseCase.noteMarkAsRead(noteId);
Expand Down
Loading