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()) }