diff options
Diffstat (limited to 'internal/api/client/exports/followers.go')
| -rw-r--r-- | internal/api/client/exports/followers.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/api/client/exports/followers.go b/internal/api/client/exports/followers.go index ceef94659..ad6306de0 100644 --- a/internal/api/client/exports/followers.go +++ b/internal/api/client/exports/followers.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" ) // ExportFollowersGETHandler swagger:operation GET /api/v1/exports/followers.csv exportFollowers @@ -39,7 +38,7 @@ import ( // // security: // - OAuth2 Bearer: -// - read:follows +// - read:accounts // // responses: // '200': @@ -52,9 +51,12 @@ import ( // '500': // description: internal server error func (m *Module) ExportFollowersGETHandler(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.ScopeReadAccounts, + ) + if errWithCode != nil { + apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return } |
