Write proper user permission code.

This commit is contained in:
Paul Makles
2021-01-09 16:50:11 +00:00
parent bb3667a83b
commit 5e70ceea01
9 changed files with 59 additions and 55 deletions

View File

@@ -5,5 +5,5 @@ use rocket_contrib::json::JsonValue;
#[get("/<target>/relationship")]
pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
Ok(json!({ "status": get_relationship(&user, &target) }))
Ok(json!({ "status": get_relationship(&user, &target.id) }))
}