mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 09:32:50 +00:00
play sounds from web ui - store uploaded sounds in database
This commit is contained in:
@@ -2,8 +2,10 @@ package routes
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/mgerb/go-discord-bot/server/db"
|
||||
"github.com/mgerb/go-discord-bot/server/webserver/discord"
|
||||
"github.com/mgerb/go-discord-bot/server/webserver/middleware"
|
||||
"github.com/mgerb/go-discord-bot/server/webserver/model"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -57,5 +59,12 @@ func oauthHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// save/update user in database
|
||||
err = model.UserSave(db.GetConn(), &user)
|
||||
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
c.JSON(200, token)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user