forked from jmug/stoatchat
Start work on notifications from client, cargo fmt
This commit is contained in:
@@ -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!([])
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user