整合列表工具类
This commit is contained in:
16
src/rest/custom/list.js
Normal file
16
src/rest/custom/list.js
Normal 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 || ""})
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user