1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 14:19:45 +00:00

Notifications are pushed asynchronously

This commit is contained in:
2022-03-12 09:10:22 +01:00
parent 2bb6a48545
commit d440ab5145
7 changed files with 43 additions and 41 deletions

View File

@@ -37,7 +37,7 @@ pub async fn configure(r: &mut HttpRequestHandler) -> RequestResult {
return r.bad_request("Independent service is unavailable!".to_string());
}
let token = independent_push_notifications_service_helper::create_token()?;
let token = independent_push_notifications_service_helper::create_token().await?;
PushNotificationToken::INDEPENDENT(token)
}
@@ -47,7 +47,7 @@ pub async fn configure(r: &mut HttpRequestHandler) -> RequestResult {
}
};
account_helper::set_push_notification_token(r.user_access_token().unwrap(), status)?;
account_helper::set_push_notification_token(r.user_access_token().unwrap(), status).await?;
r.ok()
}