Start work on notifications from client, cargo fmt

This commit is contained in:
Paul Makles
2020-12-30 11:36:32 +00:00
parent af56f5e2d8
commit f39bc07bb9
34 changed files with 341 additions and 264 deletions

View File

@@ -1,14 +1,12 @@
use crate::database::entities::User;
use rocket_contrib::json::JsonValue;
use crate::util::result::Result;
use rocket_contrib::json::JsonValue;
#[get("/relationships")]
pub async fn req(user: User) -> Result<JsonValue> {
Ok(
if let Some(vec) = user.relations {
json!(vec)
} else {
json!([])
}
)
Ok(if let Some(vec) = user.relations {
json!(vec)
} else {
json!([])
})
}