时间优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const db = require("../../utils/dbUitls");
|
||||
const zip = require("../../tools/zipProject")
|
||||
const dayjs = require("dayjs")
|
||||
module.exports = {
|
||||
action: "/node/autodeploy/getZip",
|
||||
method: "post",
|
||||
@@ -14,11 +15,10 @@ module.exports = {
|
||||
response.send({code: 0})
|
||||
}, 2000)
|
||||
zip(info).then(() => {
|
||||
db.query(`update node_autodeploy set download='${new Date()}',error='' where id='${info.id}'`)
|
||||
db.query(`update node_autodeploy set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where id='${info.id}'`)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
db.query(`update node_autodeploy set error='${err}' where id='${info.id}'`)
|
||||
|
||||
})
|
||||
} else response.send({code: 1, err: "无法找到git信息"})
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user