tyding up and tryinng to get tokens in docs to work
This commit is contained in:
parent
3e35586bbe
commit
9ce70e74e9
3 changed files with 28 additions and 11 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
// Register is a simple handler that registers a new user
|
||||
//
|
||||
// @Summary Register a new user
|
||||
// @Summary Register
|
||||
// @Description Register a new user
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
|
@ -42,7 +42,7 @@ func (gs *GState) Register(c *fiber.Ctx) error {
|
|||
// This path should obviously be protected in the future
|
||||
// UserDelete deletes a user from the database
|
||||
//
|
||||
// @Summary Deletes a user
|
||||
// @Summary UserDelete
|
||||
// @Description UserDelete deletes a user from the database
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
|
@ -125,8 +125,9 @@ func (gs *GState) Login(c *fiber.Ctx) error {
|
|||
|
||||
// LoginRenew is a simple handler that renews the token
|
||||
//
|
||||
// @Summary renews the users token
|
||||
// @Summary LoginRenews
|
||||
// @Description renews the users token
|
||||
// @Security bererToken
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
// @Produce plain
|
||||
|
@ -159,7 +160,7 @@ func (gs *GState) LoginRenew(c *fiber.Ctx) error {
|
|||
|
||||
// ListAllUsers is a handler that returns a list of all users in the application database
|
||||
//
|
||||
// @Summary Lists users
|
||||
// @Summary ListsAllUsers
|
||||
// @Description lists all users
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
|
@ -181,7 +182,7 @@ func (gs *GState) ListAllUsers(c *fiber.Ctx) error {
|
|||
return c.JSON(users)
|
||||
}
|
||||
|
||||
// @Summary promote user to admin
|
||||
// @Summary PromoteToAdmin
|
||||
// @Description promote chosen user to admin
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue