This commit is contained in:
张成
2026-03-24 16:07:07 +08:00
parent aa8eaa6ccd
commit 268520a0f2
3 changed files with 66 additions and 11 deletions

View File

@@ -31,4 +31,20 @@ module.exports = {
});
},
"POST /biz_token/revoke": async (ctx) => {
const body = getRequestBody(ct
const body = getRequestBody(ctx);
const row = await tokenLogic.revokeToken(body);
await audit.logAudit({
admin_user_id: audit.pickAdminId(ctx),
biz_user_id: row.user_id,
action: "biz_token.revoke",
resource_type: "biz_api_token",
resource_id: row.id,
});
ctx.success({ id: row.id, status: row.status });
},
"POST /biz_token/export": async (ctx) => {
const body = getRequestBody(ctx);
const res = await crud.exportCsv("biz_api_token", body);
ctx.success(res);
},
};