You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
611 B
20 lines
611 B
const {
|
|
handleArrayDaoData
|
|
} = require("../utils/tools")
|
|
const expressModel = require("./model/expressModel")
|
|
module.exports.getExpressDao = async function () {
|
|
return handleArrayDaoData(await expressModel.findAll())
|
|
}
|
|
module.exports.addExpressDao = async function (expData) {
|
|
await expressModel.create(expData)
|
|
return handleArrayDaoData(await expressModel.findAll())
|
|
}
|
|
|
|
module.exports.updateExpressDao = async function (expData) {
|
|
await expressModel.update(expData, {
|
|
where: {
|
|
id: expData.id
|
|
}
|
|
})
|
|
return handleArrayDaoData(await expressModel.findAll())
|
|
} |