mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:22:24 -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
|
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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue