🐛 Bug fixes on notification push token register

This commit is contained in:
2024-11-23 12:52:13 +08:00
parent e70041fefa
commit 63499df99f
2 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,7 @@ class NotificationProvider extends ChangeNotifier {
if (!_ua.isAuthorized) return;
log("Registering push notifications...");
await registerPushNotifications();
log("Registered push notification subscriber successfully!");
});
}
@ -54,7 +55,7 @@ class NotificationProvider extends ChangeNotifier {
log('Device Push Token is $token');
await _sn.client.post(
'/cgi/id/notifications/subscribe',
'/cgi/id/notifications/subscription',
data: {
'provider': provider,
'device_token': token,