fix last commit
This commit is contained in:
2
index.js
2
index.js
@@ -18,7 +18,7 @@ const globalConfig = await fetch(`${process.env.API_DBHOST}/config/${process.env
|
|||||||
return response.json()
|
return response.json()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
const globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
||||||
// Returns ISO 8601 Date & 24hr time for UTC-7/PDT
|
// Returns ISO 8601 Date & 24hr time for UTC-7/PDT
|
||||||
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0,19).replace('T',' ')
|
const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0,19).replace('T',' ')
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ app.post("/api/sync", (rreq,rres) => {
|
|||||||
rres.sendStatus(200)
|
rres.sendStatus(200)
|
||||||
} else if (rreq.headers["x-github-event"] == "push") {
|
} else if (rreq.headers["x-github-event"] == "push") {
|
||||||
execSync("git pull")
|
execSync("git pull")
|
||||||
globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0]
|
logRequest(rres,rreq,200,"Ran git pull, exiting to restart...")
|
||||||
logRequest(rres,rreq,200,"Ran git pull")
|
|
||||||
rres.sendStatus(200)
|
rres.sendStatus(200)
|
||||||
|
process.exit(0)
|
||||||
} else {
|
} else {
|
||||||
logRequest(rres,rreq,400)
|
logRequest(rres,rreq,400)
|
||||||
rres.sendStatus(400)
|
rres.sendStatus(400)
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# miau
|
|
||||||
miau
|
|
||||||
* miau
|
|
||||||
Reference in New Issue
Block a user