feat: update duration

This commit is contained in:
2025-12-16 16:12:55 +08:00
parent 0531a72ae6
commit 0e303e8a5c
6 changed files with 79 additions and 9 deletions

View File

@@ -5,13 +5,12 @@
package super
import (
"quyun/v2/app/http/super/dto"
"github.com/gofiber/fiber/v3"
log "github.com/sirupsen/logrus"
_ "go.ipao.vip/atom"
_ "go.ipao.vip/atom/contracts"
. "go.ipao.vip/atom/fen"
"quyun/v2/app/http/super/dto"
)
// Routes implements the HttpRoute contract and provides route registration
@@ -52,6 +51,12 @@ func (r *Routes) Register(router fiber.Router) {
r.tenant.list,
Query[dto.TenantFilter]("filter"),
))
r.log.Debugf("Registering route: Patch /super/v1/tenants/:tenantID -> tenant.updateExpire")
router.Patch("/super/v1/tenants/:tenantID", Func2(
r.tenant.updateExpire,
PathParam[int64]("tenantID"),
Body[dto.TenantExpireUpdateForm]("form"),
))
r.log.Info("Successfully registered all routes")
}