forked from jmug/stoatchat
Write proper user permission code.
This commit is contained in:
1 parent
bb3667a83b
commit
5e70ceea01
9 files changed
+59
-55
No files matched your search
@@ -33,9 +33,7 @@ pub async fn req(user: User, username: String) -> Result<JsonValue> {
|
||||
|
||||
match get_relationship(
|
||||
&user,
|
||||
&Ref {
|
||||
id: target_id.to_string(),
|
||||
},
|
||||
&target_id,
|
||||
) {
|
||||
RelationshipStatus::User => return Err(Error::NoEffect),
|
||||
RelationshipStatus::Friend => return Err(Error::AlreadyFriends),
|
||||
|
||||
Reference in new issue
Block a user