Browse Source
Add full export bundle download, auto-expire missing artifacts on task refresh, and provide task deletion actions in both API and export center UI. Made-with: Cursormain
9 changed files with 373 additions and 275 deletions
File diff suppressed because it is too large
Binary file not shown.
@ -0,0 +1,14 @@ |
|||
import { deleteExportTaskForUser } from "#server/service/export/jobs"; |
|||
import { R } from "#server/utils/response"; |
|||
|
|||
export default defineWrappedResponseHandler(async (event) => { |
|||
const user = await event.context.auth.requireUser(); |
|||
const idRaw = getRouterParam(event, "id"); |
|||
const taskId = Number(idRaw); |
|||
if (!Number.isInteger(taskId) || taskId < 1) { |
|||
throw createError({ statusCode: 400, statusMessage: "无效的任务 id" }); |
|||
} |
|||
|
|||
await deleteExportTaskForUser(taskId, user.id); |
|||
return R.success({ ok: true }); |
|||
}); |
|||
Loading…
Reference in new issue