Fix ticket closing

This commit is contained in:
rxdn 2021-07-01 13:01:56 +01:00
parent 374b050338
commit 099b49e140
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ func CloseTicket(ctx *gin.Context) {
var body closeBody var body closeBody
if err := ctx.BindJSON(&body); err != nil { if err := ctx.BindJSON(&body); err != nil {
ctx.AbortWithStatusJSON(400, gin.H{ ctx.AbortWithStatusJSON(400, gin.H{
"success": true, "success": false,
"error": "Missing reason", "error": "Missing reason",
}) })
return return

View File

@ -59,7 +59,7 @@
reason: closeReason, reason: closeReason,
}; };
const res = await axios.delete(`${API_URL}/api/${guildId}/tickets/${ticketId}`, data); const res = await axios.delete(`${API_URL}/api/${guildId}/tickets/${ticketId}`, {data: data});
if (res.status !== 200) { if (res.status !== 200) {
notifyError(res.data.error); notifyError(res.data.error);
return; return;