diff options
author | 2021-08-02 19:06:44 +0200 | |
---|---|---|
committer | 2021-08-02 19:06:44 +0200 | |
commit | 0386a28b5a3c4212320e8a96ddd14c54b65a2090 (patch) | |
tree | 3bfdf198934215ac64acac9d66d952baf65c2752 /internal/api/client/status/statusfave.go | |
parent | fix breaky linky (diff) | |
download | gotosocial-0386a28b5a3c4212320e8a96ddd14c54b65a2090.tar.xz |
Frodo swaggins (#126)
* more swagger fun
* document a whole bunch more stuff
* more swagger yayyyyyyy
* progress + go fmt
Diffstat (limited to 'internal/api/client/status/statusfave.go')
-rw-r--r-- | internal/api/client/status/statusfave.go | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/internal/api/client/status/statusfave.go b/internal/api/client/status/statusfave.go index 888589a8a..a76acf3d9 100644 --- a/internal/api/client/status/statusfave.go +++ b/internal/api/client/status/statusfave.go @@ -26,7 +26,41 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// StatusFavePOSTHandler handles fave requests against a given status ID +// StatusFavePOSTHandler swagger:operation POST /api/v1/statuses/{id}/favourite statusFave +// +// Star/like/favourite the given status, if permitted. +// +// --- +// tags: +// - statuses +// +// produces: +// - application/json +// +// parameters: +// - name: id +// type: string +// description: Target status ID. +// in: path +// required: true +// +// security: +// - OAuth2 Bearer: +// - write:statuses +// +// responses: +// '200': +// description: "The newly faved status." +// schema: +// "$ref": "#/definitions/status" +// '400': +// description: bad request +// '401': +// description: unauthorized +// '403': +// description: forbidden +// '404': +// description: not found func (m *Module) StatusFavePOSTHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "StatusFavePOSTHandler", |