1
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
const crud = require("../service/biz_admin_crud");
|
||||
|
||||
const baseModel = require("../../middleware/baseModel");
|
||||
const { find_page, find_for_export } = require("../service/biz_query_helpers");
|
||||
|
||||
module.exports = {
|
||||
"POST /biz_audit_log/page": async (ctx) => {
|
||||
const body = ctx.getBody();
|
||||
|
||||
|
||||
const data = await crud.page("biz_audit_log", body);
|
||||
ctx.success({ rows: data.rows, count: data.count });
|
||||
const { count, rows } = await find_page(baseModel.biz_audit_log, "biz_audit_log", body);
|
||||
ctx.success({ rows, count });
|
||||
},
|
||||
"POST /biz_audit_log/export": async (ctx) => {
|
||||
const body = ctx.getBody();
|
||||
const res = await crud.exportCsv("biz_audit_log", body);
|
||||
const res = await find_for_export(baseModel.biz_audit_log, "biz_audit_log", body);
|
||||
ctx.success(res);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user