📝 Create missing models for API documentation
This commit is contained in:
@ -11,17 +11,18 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// LoginHandler godoc
|
||||
// LoginHandler godoc
|
||||
//
|
||||
// @Summary User login
|
||||
// @Description Authenticate user and return JWT token
|
||||
// @Tags Authentication
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param loginCredentials body models.LoginCredentials true "Login Credentials"
|
||||
// @Success 200 {object} map[string]string "Successfully authenticated, JWT token returned"
|
||||
// @Failure 400 {object} map[string]string "Invalid request body"
|
||||
// @Failure 401 {object} map[string]string "Invalid login credentials"
|
||||
// @Failure 500 {object} map[string]string "Internal server error"
|
||||
// @Success 200 {object} models.TokenResponse "Successfully authenticated, JWT token returned"
|
||||
// @Failure 400 {object} models.ErrorResponse "Invalid request body"
|
||||
// @Failure 401 {object} models.ErrorResponse "Invalid login credentials"
|
||||
// @Failure 500 {object} models.ErrorResponse "Internal server error"
|
||||
// @Router /login [post]
|
||||
func LoginHandler(c *gin.Context) {
|
||||
var creds models.LoginCredentials
|
||||
|
Reference in New Issue
Block a user