feat: expand superadmin edits and minio docs
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
dto "quyun/v2/app/http/super/v1/dto"
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/app/services"
|
||||
"quyun/v2/database/models"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
@@ -233,6 +234,24 @@ func (c *users) UpdateRoles(ctx fiber.Ctx, id int64, form *dto.UserRolesUpdateFo
|
||||
return services.Super.UpdateUserRoles(ctx, id, form)
|
||||
}
|
||||
|
||||
// Update user profile
|
||||
//
|
||||
// @Router /super/v1/users/:id<int> [patch]
|
||||
// @Summary Update user profile
|
||||
// @Description Update user profile fields
|
||||
// @Tags User
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int64 true "User ID"
|
||||
// @Param form body dto.SuperUserProfileUpdateForm true "Update form"
|
||||
// @Success 200 {string} string "Updated"
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *users) UpdateProfile(ctx fiber.Ctx, user *models.User, id int64, form *dto.SuperUserProfileUpdateForm) error {
|
||||
return services.Super.UpdateUserProfile(ctx, user.ID, id, form)
|
||||
}
|
||||
|
||||
// User statistics
|
||||
//
|
||||
// @Router /super/v1/users/statistics [get]
|
||||
|
||||
Reference in New Issue
Block a user