fix(bans): fix data format returned

This commit is contained in:
Paul Makles
2022-02-22 22:51:39 +00:00
parent 7b1a3dc7dd
commit 71c01e0817
2 changed files with 31 additions and 12 deletions

View File

@@ -34,11 +34,5 @@ pub async fn req(
let member = target.as_member(db, &server.id).await?;
// ! FIXME_PERMISSIONS
let ban = ServerBan {
id: member.id,
reason: data.reason,
};
db.insert_ban(&ban).await?;
Ok(Json(ban))
member.ban(db, data.reason).await.map(Json)
}