diff options
Diffstat (limited to 'internal/api/client/accounts/accountverify.go')
| -rw-r--r-- | internal/api/client/accounts/accountverify.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/api/client/accounts/accountverify.go b/internal/api/client/accounts/accountverify.go index 1799089ab..f9dd5ae9c 100644 --- a/internal/api/client/accounts/accountverify.go +++ b/internal/api/client/accounts/accountverify.go @@ -23,7 +23,6 @@ import ( "github.com/gin-gonic/gin" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" "github.com/superseriousbusiness/gotosocial/internal/gtserror" - "github.com/superseriousbusiness/gotosocial/internal/oauth" ) // AccountVerifyGETHandler swagger:operation GET /api/v1/accounts/verify_credentials accountVerify @@ -56,9 +55,13 @@ import ( // '500': // description: internal server error func (m *Module) AccountVerifyGETHandler(c *gin.Context) { - authed, err := oauth.Authed(c, true, true, true, true) - if err != nil { - apiutil.ErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGetV1) + authed, errWithCode := apiutil.TokenAuth(c, + true, true, true, true, + apiutil.ScopeProfile, + apiutil.ScopeReadAccounts, + ) + if errWithCode != nil { + apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return } |
