mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 06:22:26 -05:00
[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:
parent
bf46b87343
commit
79914bdbf7
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue