From 5e5ec137dd4d12110dac6b88f885cc8c12b7b4c9 Mon Sep 17 00:00:00 2001 From: Enstrayed <48845980+Enstrayed@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:02:45 -0800 Subject: [PATCH] fix last commit --- index.js | 2 +- routes/frontpage.js | 4 ++-- website/posts/99999999-test.md | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 website/posts/99999999-test.md diff --git a/index.js b/index.js index 3e35fb1..e0b2a20 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ const globalConfig = await fetch(`${process.env.API_DBHOST}/config/${process.env 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 const startTime = new Date(new Date().getTime() - 25200000).toISOString().slice(0,19).replace('T',' ') diff --git a/routes/frontpage.js b/routes/frontpage.js index c47b9b3..2ef1fad 100644 --- a/routes/frontpage.js +++ b/routes/frontpage.js @@ -50,9 +50,9 @@ app.post("/api/sync", (rreq,rres) => { rres.sendStatus(200) } else if (rreq.headers["x-github-event"] == "push") { execSync("git pull") - globalVersion = execSync(`git show --oneline -s`).toString().split(" ")[0] - logRequest(rres,rreq,200,"Ran git pull") + logRequest(rres,rreq,200,"Ran git pull, exiting to restart...") rres.sendStatus(200) + process.exit(0) } else { logRequest(rres,rreq,400) rres.sendStatus(400) diff --git a/website/posts/99999999-test.md b/website/posts/99999999-test.md deleted file mode 100644 index a069d21..0000000 --- a/website/posts/99999999-test.md +++ /dev/null @@ -1,3 +0,0 @@ -# miau -miau -* miau \ No newline at end of file