feat(project): implement async project deletion and storage cleanup

This commit is contained in:
yiling
2026-05-23 18:09:30 +08:00
parent b9bb4ba143
commit 8bc275e446
9 changed files with 408 additions and 22 deletions
+13
View File
@@ -113,6 +113,19 @@ const route = new Hono<{ Variables: { user: User } }>()
const p = await projectService.getProject(projectId)
return c.json(p)
})
.delete('/projects/:projectId', async (c) => {
const projectId = c.req.param('projectId')
const user = c.get('user')
await authzService.hasPermission({
projectId,
user,
permission: Permission.Admin,
})
await projectService.deleteProject(projectId)
return c.json({ success: true })
})
.get('/projects/:projectId/team', async (c) => {
const projectId = c.req.param('projectId')
const user = c.get('user')