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

Turned a lot of function to async mode

This commit is contained in:
2022-03-12 07:47:22 +01:00
parent cfaaef68b7
commit 09ce13c554
24 changed files with 368 additions and 357 deletions

View File

@@ -73,14 +73,14 @@ pub async fn mark_seen(r: &mut HttpRequestHandler) -> RequestResult {
notif.from_user_id = None;
}
notifications_helper::delete(&notif)?;
notifications_helper::delete(&notif).await?;
r.success("Notification deleted")
}
/// Delete all the notifications of the current user
pub async fn delete_all(r: &mut HttpRequestHandler) -> RequestResult {
notifications_helper::delete_all_user(r.user_id_ref()?)?;
notifications_helper::delete_all_user(r.user_id_ref()?).await?;
r.success("Notifications deleted.")
}