Skip to content

Commit

Permalink
Merge pull request #158 from UnivApp/feature/notification-refactor10
Browse files Browse the repository at this point in the history
feat: 알림 처리 어노테이션 설정
  • Loading branch information
nyeroni authored Oct 30, 2024
2 parents ed2534f + b24276d commit 8fbef4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/yerong/wedle/WedleApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@EnableJpaAuditing
@SpringBootApplication
public class WedleApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private CalendarEvent getCalendarEventById(Long calendarId) {
}

@Transactional
@Scheduled(cron = "0 0 10 * * ?")
@Scheduled(cron = "0 40 14 * * ?")
public void sendNotifications() {
LocalDate today = LocalDate.now();
List<Notification> dueNotifications = notificationRepository.findByNotificationDate(today);
Expand All @@ -81,7 +81,7 @@ public void sendNotifications() {
if (notification.isActive()) {
List<String> registrationTokens = notification.getRegistrationTokens();
String title = notification.getEvent().getTitle();
String body = "";
String body = "일정 당일입니다.";

FcmUtils.broadCast(registrationTokens, title, body);

Expand Down

0 comments on commit 8fbef4d

Please sign in to comment.