feat: Enhance Swagger documentation with new admin and user endpoints
Some checks failed
build quyun / Build (push) Failing after 2m1s
Some checks failed
build quyun / Build (push) Failing after 2m1s
- Added definitions for admin authentication, media, posts, orders, and user management. - Implemented new API paths for admin functionalities including authentication, media management, order processing, and user statistics. - Updated existing endpoints to improve clarity and structure in the Swagger documentation. - Introduced new response schemas for various operations to standardize API responses.
This commit is contained in:
@@ -22,8 +22,14 @@ type TokenResponse struct {
|
||||
|
||||
// Login
|
||||
//
|
||||
// @Router /admin/auth [post]
|
||||
// @Bind body body
|
||||
// @Summary 管理员登录
|
||||
// @Tags Admin Auth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body AuthBody true "请求体"
|
||||
// @Success 200 {object} TokenResponse "成功"
|
||||
// @Router /admin/auth [post]
|
||||
// @Bind body body
|
||||
func (ctl *auth) Login(ctx fiber.Ctx, body *AuthBody) (*TokenResponse, error) {
|
||||
if body.Username == "pl.yang" && body.Password == "Xixi@0202" {
|
||||
claim := ctl.jwt.CreateClaims(jwt.BaseClaims{
|
||||
|
||||
Reference in New Issue
Block a user