1
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
const crud = require("../service/biz_admin_crud");
|
||||
const { getRequestBody } = crud;
|
||||
|
||||
|
||||
module.exports = {
|
||||
"POST /biz_usage/page": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const body = ctx.getBody();
|
||||
const data = await crud.page("biz_usage_monthly", body);
|
||||
ctx.success({ rows: data.rows, count: data.count });
|
||||
},
|
||||
"POST /biz_usage/add": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const body = ctx.getBody();
|
||||
const row = await crud.add("biz_usage_monthly", body);
|
||||
ctx.success(row);
|
||||
},
|
||||
"POST /biz_usage/edit": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const body = ctx.getBody();
|
||||
await crud.edit("biz_usage_monthly", body);
|
||||
ctx.success({});
|
||||
},
|
||||
"POST /biz_usage/del": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const body = ctx.getBody();
|
||||
await crud.del("biz_usage_monthly", body);
|
||||
ctx.success({});
|
||||
},
|
||||
@@ -28,7 +28,7 @@ module.exports = {
|
||||
ctx.success(row);
|
||||
},
|
||||
"POST /biz_usage/export": async (ctx) => {
|
||||
const body = getRequestBody(ctx);
|
||||
const body = ctx.getBody();
|
||||
const res = await crud.exportCsv("biz_usage_monthly", body);
|
||||
ctx.success(res);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user