Fix ticket closing
This commit is contained in:
parent
374b050338
commit
099b49e140
@ -29,7 +29,7 @@ func CloseTicket(ctx *gin.Context) {
|
||||
var body closeBody
|
||||
if err := ctx.BindJSON(&body); err != nil {
|
||||
ctx.AbortWithStatusJSON(400, gin.H{
|
||||
"success": true,
|
||||
"success": false,
|
||||
"error": "Missing reason",
|
||||
})
|
||||
return
|
||||
|
@ -59,7 +59,7 @@
|
||||
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) {
|
||||
notifyError(res.data.error);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user