Fix ticket closing
This commit is contained in:
parent
374b050338
commit
099b49e140
@ -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
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user