fix: swagger
This commit is contained in:
@@ -13,16 +13,32 @@ import (
|
||||
type tenant struct{}
|
||||
|
||||
// list
|
||||
// @Router /super/v1/tenants [get]
|
||||
// @Bind filter query
|
||||
//
|
||||
// @Summary 租户列表
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param filter query dto.TenantFilter true "Filter"
|
||||
// @Success 200 {object} requests.Pager{items=dto.TenantItem}
|
||||
//
|
||||
// @Router /super/v1/tenants [get]
|
||||
// @Bind filter query
|
||||
func (*tenant) list(ctx fiber.Ctx, filter *dto.TenantFilter) (*requests.Pager, error) {
|
||||
return services.Tenant.Pager(ctx, filter)
|
||||
}
|
||||
|
||||
// list
|
||||
// @Router /super/v1/tenants/:tenantID [patch]
|
||||
// @Bind tenantID path
|
||||
// @Bind form body
|
||||
// updateExpire
|
||||
//
|
||||
// @Summary 更新过期时间
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param tenantID path int64 true "TenantID"
|
||||
// @Param form body dto.TenantExpireUpdateForm true "Form"
|
||||
//
|
||||
// @Router /super/v1/tenants/:tenantID [patch]
|
||||
// @Bind tenantID path
|
||||
// @Bind form body
|
||||
func (*tenant) updateExpire(ctx fiber.Ctx, tenantID int64, form *dto.TenantExpireUpdateForm) error {
|
||||
duration, err := form.ParseDuration()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user