Fix issues with incoming PRs.

This commit is contained in:
Paul
2021-08-16 14:07:42 +01:00
parent c632341eb7
commit 326e539ad3
18 changed files with 42 additions and 32 deletions

View File

@@ -70,7 +70,8 @@ pub async fn req(user: User, target: Ref) -> Result<EmptyResponse> {
target.publish_update(json!({ "owner": new_owner })).await?;
} else {
return target.delete().await;
target.delete().await?;
return Ok(EmptyResponse {});
}
} else {
get_collection("channels")
@@ -108,7 +109,8 @@ pub async fn req(user: User, target: Ref) -> Result<EmptyResponse> {
Channel::TextChannel { .. } |
Channel::VoiceChannel { .. } => {
if perm.get_manage_channel() {
target.delete().await
target.delete().await?;
Ok(EmptyResponse {})
} else {
Err(Error::MissingPermission)
}