enforce scopes

This commit is contained in:
tobi 2025-02-25 14:21:44 +01:00
commit 21d9edac54
191 changed files with 1473 additions and 648 deletions

View file

@ -37,8 +37,7 @@ import (
// - application/json
//
// security:
// - OAuth2 Bearer:
// - read:custom_emojis
// - OAuth2 Bearer: []
//
// responses:
// '200':
@ -54,8 +53,11 @@ import (
// '500':
// description: internal server error
func (m *Module) CustomEmojisGETHandler(c *gin.Context) {
if _, err := apiutil.TokenAuth(c, true, true, true, true); err != nil {
apiutil.ErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGetV1)
_, errWithCode := apiutil.TokenAuth(c,
true, true, true, true,
)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}