1
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user