[bugfix] set correct scope for StatusFavePOSTHandler (#4310)

> **OAuth:** User token + `write:favourites`

https://docs.joinmastodon.org/methods/statuses/#favourite

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4310
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk 2025-07-04 15:29:27 +02:00 committed by kim
commit 79914bdbf7
2 changed files with 3 additions and 3 deletions

View file

@ -11347,7 +11347,7 @@ paths:
description: internal server error description: internal server error
security: security:
- OAuth2 Bearer: - OAuth2 Bearer:
- write:statuses - write:favourites
summary: Star/like/favourite the given status, if permitted. summary: Star/like/favourite the given status, if permitted.
tags: tags:
- statuses - statuses

View file

@ -47,7 +47,7 @@ import (
// //
// security: // security:
// - OAuth2 Bearer: // - OAuth2 Bearer:
// - write:statuses // - write:favourites
// //
// responses: // responses:
// '200': // '200':
@ -69,7 +69,7 @@ import (
func (m *Module) StatusFavePOSTHandler(c *gin.Context) { func (m *Module) StatusFavePOSTHandler(c *gin.Context) {
authed, errWithCode := apiutil.TokenAuth(c, authed, errWithCode := apiutil.TokenAuth(c,
true, true, true, true, true, true, true, true,
apiutil.ScopeWriteStatuses, apiutil.ScopeWriteFavourites,
) )
if errWithCode != nil { if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)