forked from jmug/stoatchat
Fix issues with incoming PRs.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ pub async fn req(user: User, target: Ref, member: Ref) -> Result<EmptyResponse>
|
||||
Err(Error::MissingPermission)?
|
||||
}
|
||||
|
||||
channel.add_to_group(member.id, user.id).await;
|
||||
channel.add_to_group(member.id, user.id).await?;
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ pub async fn req(user: User, target: Ref, msg: Ref) -> Result<EmptyResponse> {
|
||||
}
|
||||
}
|
||||
|
||||
message.delete().await;
|
||||
message.delete().await?;
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
@@ -73,6 +73,6 @@ pub async fn req(user: User, target: Ref, msg: Ref, edit: Json<Data>) -> Result<
|
||||
with: "message",
|
||||
})?;
|
||||
|
||||
message.publish_update(update).await;
|
||||
message.publish_update(update).await?;
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user