feat(trash): implement two-stage trashcan and project cleanup

This commit is contained in:
yiling
2026-05-23 23:26:43 +08:00
parent f05247f372
commit effec44870
15 changed files with 272 additions and 171 deletions
+2 -1
View File
@@ -104,7 +104,8 @@ const route = new Hono<{ Variables: { user: User } }>()
const resp = await assetService.listChildren({
assetId: folderId,
assetType: req.assetType,
projectId: req.projectId,
showDeleted: req.showDeleted,
sort: req.sort,
order: req.order,
})
+9 -2
View File
@@ -62,6 +62,7 @@ const route = new Hono<{ Variables: { user: User } }>()
async (c) => {
const projectId = c.req.param('projectId')
const user = c.get('user')
const req = c.req.valid('query')
await authzService.hasPermission({
projectId,
@@ -69,8 +70,14 @@ const route = new Hono<{ Variables: { user: User } }>()
permission: Permission.Read,
})
// STUB: AssetService is not migrated yet.
return c.json({ data: [], pageInfo: {} })
const resp = await assetService.listChildren({
projectId,
assetType: req.assetType,
showDeleted: true,
after: req.after,
first: req.first,
})
return c.json(resp)
},
)
.get('/teams/:teamId/projects', zValidator('query', listProjectsRequestSchema), async (c) => {