mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 01:20:04 +00:00
feat(trash): implement two-stage trashcan and project cleanup
This commit is contained in:
+2
-1
@@ -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
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user