diff --git a/app/http/endpoints/manage/webchatws.go b/app/http/endpoints/manage/webchatws.go index 7db764c..cae00ed 100644 --- a/app/http/endpoints/manage/webchatws.go +++ b/app/http/endpoints/manage/webchatws.go @@ -178,7 +178,7 @@ func WebChatWs(ctx *gin.Context) { success := false if webhook != nil { - success = executeWebhook(content, ticket.Uuid, *webhook, store) + success = executeWebhook( ticket.Uuid, *webhook, content, store) } if !success { @@ -207,7 +207,7 @@ func executeWebhook(uuid, webhook, content string, store sessions.Session) bool encoded, err := json.Marshal(&body); if err != nil { return false } - req, err := http.NewRequest("POST", fmt.Sprintf("https://discordapp.com/api/v6/webhooks/%s", webhook), bytes.NewBuffer(encoded)); if err != nil { + req, err := http.NewRequest("POST", fmt.Sprintf("https://canary.discordapp.com/api/webhooks/%s", webhook), bytes.NewBuffer(encoded)); if err != nil { return false } diff --git a/database/table/ticketwebhook.go b/database/table/ticketwebhook.go index fa5a18e..bfce1ed 100644 --- a/database/table/ticketwebhook.go +++ b/database/table/ticketwebhook.go @@ -3,8 +3,8 @@ package table import "github.com/TicketsBot/GoPanel/database" type TicketWebhook struct { - Uuid string `gorm:"column:UUID;type:varchar(36);unique;primary_key"` - WebhookUrl string `gorm:"column:CDNURL;type:varchar(200)"` + Uuid string `gorm:"column:UUID;type:varchar(36);unique;primary_key"` + WebhookUrl string `gorm:"column:CDNURL;type:varchar(200)"` } func (TicketWebhook) TableName() string {