1
This commit is contained in:
@@ -55,6 +55,27 @@ module.exports = {
|
||||
});
|
||||
ctx.success({ id: row.id, status: row.status });
|
||||
},
|
||||
"POST /biz_token/regenerate": async (ctx) => {
|
||||
const body = ctx.getBody();
|
||||
const result = await tokenLogic.regenerateToken(body);
|
||||
await audit.logAudit({
|
||||
admin_user_id: audit.pickAdminId(ctx),
|
||||
biz_user_id: result.row.user_id,
|
||||
action: "biz_token.regenerate",
|
||||
resource_type: "biz_api_token",
|
||||
resource_id: result.row.id,
|
||||
detail: { token_name: result.row.token_name },
|
||||
});
|
||||
ctx.success({
|
||||
id: result.row.id,
|
||||
user_id: result.row.user_id,
|
||||
plan_id: result.row.plan_id,
|
||||
token_name: result.row.token_name,
|
||||
expire_at: result.row.expire_at,
|
||||
plain_token: result.plain_token,
|
||||
warn: result.warn,
|
||||
});
|
||||
},
|
||||
"POST /biz_token/export": async (ctx) => {
|
||||
const body = ctx.getBody();
|
||||
const param = body.param || body;
|
||||
|
||||
Reference in New Issue
Block a user