use the right import

This commit is contained in:
Dot-Rar 2020-03-05 15:01:48 +00:00
parent 07256467d3
commit 86ddac0167
2 changed files with 6 additions and 7 deletions

View File

@ -9,7 +9,6 @@ import (
"github.com/TicketsBot/GoPanel/utils/discord/endpoints/channel"
"github.com/TicketsBot/GoPanel/utils/discord/endpoints/webhooks"
"github.com/TicketsBot/GoPanel/utils/discord/objects"
"github.com/TicketsBot/TicketsGo/database"
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
@ -171,7 +170,7 @@ func WebChatWs(ctx *gin.Context) {
// Preferably send via a webhook
webhookChan := make(chan *string)
go database.GetWebhookByUuid(ticket.Uuid, webhookChan)
go table.GetWebhookByUuid(ticket.Uuid, webhookChan)
webhook := <-webhookChan
success := false
@ -191,10 +190,10 @@ func WebChatWs(ctx *gin.Context) {
}, nil, &resChan)
res := <-resChan
if res.StatusCode == 200 {
success = true
if res.StatusCode == 404 || res.StatusCode == 403 {
go table.DeleteWebhookByUuid(ticket.Uuid)
} else {
go database.DeleteWebhookByUuid(ticket.Uuid)
success = true
}
}

View File

@ -10,7 +10,7 @@ import (
"github.com/TicketsBot/GoPanel/config"
"github.com/TicketsBot/GoPanel/database"
"github.com/TicketsBot/GoPanel/utils"
"github.com/TicketsBot/TicketsGo/sentry"
"github.com/apex/log"
"math/rand"
"time"
)
@ -21,7 +21,7 @@ func main() {
if err == nil {
rand.Seed(int64(binary.LittleEndian.Uint64(b[:])))
} else {
sentry.Error(err)
log.Error(err.Error())
rand.Seed(time.Now().UnixNano())
}