push notifications not working for some reason
CI/CD / Backend Unit Tests (push) Successful in 1m48s
CI/CD / Deploy (push) Successful in 1m38s

This commit is contained in:
2026-06-11 01:29:48 +02:00
parent 30d2abd4c5
commit 14725e180a
10 changed files with 429 additions and 63 deletions
@@ -56,7 +56,7 @@ public class SecurityConfig {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOrigins(List.of(
"http://localhost:3000",
"http://localhost:8081",
"https://etf-oglasi.ksan.dev"
));
@@ -31,9 +31,11 @@ public class NotificationService {
.build();
try {
firebaseMessaging.send(message);
String id = firebaseMessaging.send(message);
System.out.println("Send:" + id);
} catch (FirebaseMessagingException ex) {
ex.printStackTrace();
if (ex.getMessagingErrorCode()
== MessagingErrorCode.UNREGISTERED) {
deviceTokenRepo.delete(token);