1
This commit is contained in:
@@ -86,6 +86,20 @@ module.exports = {
|
||||
});
|
||||
ctx.success({});
|
||||
},
|
||||
"POST /biz_user/enable": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const id = body.id;
|
||||
if (id == null) return ctx.fail("缺少 id");
|
||||
await baseModel.biz_user.update({ status: "active" }, { where: { id } });
|
||||
await audit.logAudit({
|
||||
admin_user_id: audit.pickAdminId(ctx),
|
||||
biz_user_id: id,
|
||||
action: "biz_user.enable",
|
||||
resource_type: "biz_user",
|
||||
resource_id: id,
|
||||
});
|
||||
ctx.success({});
|
||||
},
|
||||
"POST /biz_user/export": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const res = await crud.exportCsv("biz_user", body);
|
||||
|
||||
Reference in New Issue
Block a user