feat: 添加租户列表接口,优化租户相关功能;更新前端租户列表和收藏功能

This commit is contained in:
2026-01-07 16:10:03 +08:00
parent 1298192157
commit 5b45f7d5c4
10 changed files with 252 additions and 77 deletions

View File

@@ -241,17 +241,15 @@ func (r *Routes) Register(router fiber.Router) {
Body[dto.Settings]("form"),
))
// Register routes for controller: Storage
r.log.Debugf("Registering route: Get /v1/storage/:key -> storage.Download")
router.Get("/v1/storage/:key"[len(r.Path()):], Func3(
r.log.Debugf("Registering route: Get /v1/storage/* -> storage.Download")
router.Get("/v1/storage/*"[len(r.Path()):], Func2(
r.storage.Download,
PathParam[string]("key"),
QueryParam[string]("expires"),
QueryParam[string]("sign"),
))
r.log.Debugf("Registering route: Put /v1/storage/:key -> storage.Upload")
router.Put("/v1/storage/:key"[len(r.Path()):], DataFunc3(
r.log.Debugf("Registering route: Put /v1/storage/* -> storage.Upload")
router.Put("/v1/storage/*"[len(r.Path()):], DataFunc2(
r.storage.Upload,
PathParam[string]("key"),
QueryParam[string]("expires"),
QueryParam[string]("sign"),
))
@@ -268,6 +266,11 @@ func (r *Routes) Register(router fiber.Router) {
PathParam[string]("id"),
Query[dto.ContentListFilter]("filter"),
))
r.log.Debugf("Registering route: Get /v1/tenants -> tenant.List")
router.Get("/v1/tenants"[len(r.Path()):], DataFunc1(
r.tenant.List,
Query[dto.TenantListFilter]("filter"),
))
r.log.Debugf("Registering route: Get /v1/tenants/:id -> tenant.Get")
router.Get("/v1/tenants/:id"[len(r.Path()):], DataFunc2(
r.tenant.Get,