mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 04:33:32 -06:00
Swagger (#124)
* start experimenting with swagger documentation * further adventures in swagger * do a few more api paths * account paths documented * go fmt * fix up some models * bit o lintin'
This commit is contained in:
parent
eb13faf54f
commit
58dddd86e0
37 changed files with 2355 additions and 169 deletions
|
|
@ -27,7 +27,33 @@ import (
|
|||
|
||||
// AccountVerifyGETHandler serves a user's account details to them IF they reached this
|
||||
// handler while in possession of a valid token, according to the oauth middleware.
|
||||
// It should be served as a GET at /api/v1/accounts/verify_credentials
|
||||
// It should be served as a GET at /api/v1/accounts/verify_credentials.
|
||||
//
|
||||
// swagger:operation GET /api/v1/accounts/verify_credentials accountVerify
|
||||
//
|
||||
// Verify a token by returning account details pertaining to it.
|
||||
//
|
||||
// ---
|
||||
// tags:
|
||||
// - accounts
|
||||
//
|
||||
// produces:
|
||||
// - application/json
|
||||
//
|
||||
// security:
|
||||
// - OAuth2 Bearer:
|
||||
// - read:accounts
|
||||
//
|
||||
// responses:
|
||||
// '200':
|
||||
// schema:
|
||||
// "$ref": "#/definitions/account"
|
||||
// '401':
|
||||
// description: unauthorized
|
||||
// '400':
|
||||
// description: bad request
|
||||
// '404':
|
||||
// description: not found
|
||||
func (m *Module) AccountVerifyGETHandler(c *gin.Context) {
|
||||
l := m.log.WithField("func", "accountVerifyGETHandler")
|
||||
authed, err := oauth.Authed(c, true, false, false, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue