push notifications not working for some reason
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user