整合列表工具类

This commit is contained in:
aixianling
2022-07-02 15:15:05 +08:00
parent 90ab258629
commit e86b8b2f46
3 changed files with 54 additions and 16 deletions

16
src/rest/custom/list.js Normal file
View File

@@ -0,0 +1,16 @@
const dbUtils = require("../../utils/dbUitls");
module.exports = {
action: "/node/custom/list",
method: "post",
execute: (request, response) => {
let {size, current, name} = request.query
dbUtils.list({
table: 'node_custom_config', con: name,
search: {size, current}
}).then(data => {
response.send({code: 0, data})
}).catch(err => {
response.send({code: 1, err: err?.sqlMessage || err || ""})
})
}
}