16 lines
322 B
Go
16 lines
322 B
Go
package endpoints
|
|
|
|
import (
|
|
"git.zomo.dev/zomo/discord-retokenizer/storage"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func access(c *gin.Context) {
|
|
authType, token := getAuthorization(c)
|
|
if authType != AuthorizationScopeBot {
|
|
c.AbortWithStatus(401)
|
|
}
|
|
|
|
_, botToken := storage.BotTokenFromToken(token)
|
|
c.String(200, botToken)
|
|
} |