Fix: Handle status::User on group create.
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export version=0.5.0-alpha.0-patch.0
|
export version=0.5.0-alpha.1
|
||||||
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
||||||
|
|||||||
@@ -38,8 +38,12 @@ pub async fn req(user: User, info: Json<Data>) -> Result<JsonValue> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for target in &set {
|
for target in &set {
|
||||||
if get_relationship(&user, target) != RelationshipStatus::Friend {
|
match get_relationship(&user, target) {
|
||||||
Err(Error::NotFriends)?
|
RelationshipStatus::Friend |
|
||||||
|
RelationshipStatus::User => {},
|
||||||
|
_ => {
|
||||||
|
return Err(Error::NotFriends);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pub const VERSION: &str = "0.5.0-alpha.0-patch.0";
|
pub const VERSION: &str = "0.5.0-alpha.1";
|
||||||
|
|||||||
Reference in New Issue
Block a user