summaryrefslogtreecommitdiff
path: root/internal/api/client/reports/reportsget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/reports/reportsget.go')
-rw-r--r--internal/api/client/reports/reportsget.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/api/client/reports/reportsget.go b/internal/api/client/reports/reportsget.go
index 4c3d4e33a..65adf664f 100644
--- a/internal/api/client/reports/reportsget.go
+++ b/internal/api/client/reports/reportsget.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"
"github.com/superseriousbusiness/gotosocial/internal/paging"
)
@@ -94,7 +93,7 @@ import (
//
// security:
// - OAuth2 Bearer:
-// - read:reports
+// - read:accounts
//
// responses:
// '200':
@@ -119,9 +118,12 @@ import (
// '500':
// description: internal server error
func (m *Module) ReportsGETHandler(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
}