diff options
| author | 2025-07-04 15:29:27 +0200 | |
|---|---|---|
| committer | 2025-07-04 15:29:27 +0200 | |
| commit | 79914bdbf7677b5c708cc3431af611df2c4a46b2 (patch) | |
| tree | 05c611eb8d115f6b0e9b960a42b99f50e925c8f5 | |
| parent | [docs] Document STARTTLS behavior (#4301) (diff) | |
| download | gotosocial-79914bdbf7677b5c708cc3431af611df2c4a46b2.tar.xz | |
[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>
| -rw-r--r-- | docs/api/swagger.yaml | 2 | ||||
| -rw-r--r-- | internal/api/client/statuses/statusfave.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 924dcffdb..955d332a3 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -11347,7 +11347,7 @@ paths: description: internal server error security: - OAuth2 Bearer: - - write:statuses + - write:favourites summary: Star/like/favourite the given status, if permitted. tags: - statuses diff --git a/internal/api/client/statuses/statusfave.go b/internal/api/client/statuses/statusfave.go index 54d717ddd..592eb86b2 100644 --- a/internal/api/client/statuses/statusfave.go +++ b/internal/api/client/statuses/statusfave.go @@ -47,7 +47,7 @@ import ( // // security: // - OAuth2 Bearer: -// - write:statuses +// - write:favourites // // responses: // '200': @@ -69,7 +69,7 @@ import ( func (m *Module) StatusFavePOSTHandler(c *gin.Context) { authed, errWithCode := apiutil.TokenAuth(c, true, true, true, true, - apiutil.ScopeWriteStatuses, + apiutil.ScopeWriteFavourites, ) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) |
