Files
handmade-revolt-backend/src/routes/sync/get_unreads.rs
Paul ad06ff16c4 Messaging: Upsert mentions into unreads.
Messaging: Allow multiple attachment upload.
2021-06-22 17:42:18 +01:00

11 lines
236 B
Rust

use crate::database::*;
use crate::util::result::Result;
use mongodb::bson::doc;
use rocket_contrib::json::JsonValue;
#[get("/unreads")]
pub async fn req(user: User) -> Result<JsonValue> {
Ok(json!(user.fetch_unreads().await?))
}