Client controller, and WIP with edits and deletion of notice

This commit is contained in:
2025-04-11 15:53:50 +02:00
parent b826a01a10
commit 4fa138203d
9 changed files with 109 additions and 26 deletions

View File

@@ -70,4 +70,13 @@ public class NoticeService {
public void addNotice(Notice notice) {
noticeRepository.save(notice);
}
public boolean noticeExists(Long id) {
return noticeRepository.existsById(id);
}
public NoticeDTO updateNotice(NoticeDTO dto) {
Notice notice = createFromDTO(dto);
return toDTO(noticeRepository.save(notice));
}
}