mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 21:47:02 +00:00
9 lines
327 B
Rust
9 lines
327 B
Rust
use crate::database::{entities::User, guards::reference::Ref, permissions::get_relationship};
|
|
use crate::util::result::Result;
|
|
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) }))
|
|
}
|