dev add delete method
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-04-07 11:48:20 +07:00
parent d8f6a08a2f
commit e71ce9bc10
3 changed files with 20 additions and 24 deletions
@@ -34,16 +34,12 @@ public class NotificationService {
@Transactional
public void addNotification(NotificationType notificationType, long userId, Object... args) {
Locale locale = Locale.forLanguageTag("ru");
String message = messageSource.getMessage(notificationType.getMessageKey(), args, locale);
Notification notification = Notification.builder()
.notificationType(notificationType)
.createdAt(LocalDateTime.now())
.user(userRepository.findById(userId).orElseThrow())
.status(NotificationStatus.NEW)
.message(message)
.message(notificationType.getMessageKey())
.build();
notificationRepository.save(notification);