cleanup repo + add articles

This commit is contained in:
Enstrayed
2025-09-01 22:45:04 -07:00
parent 3bc0861f21
commit 4de76c34c2
8 changed files with 16 additions and 34 deletions

21
archive/old.js Normal file
View File

@@ -0,0 +1,21 @@
// This file contains old code not used anymore
app.post("/api/sync", (rreq,rres) => {
checkToken(rreq.query.auth,"fpupdate").then(checkResponse => {
if (checkResponse === true) {
if (rreq.headers["x-github-event"] == "ping") {
rres.sendStatus(200)
} else if (rreq.headers["x-github-event"] == "push") {
execSync("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)
}
} else {
rres.sendStatus(401)
}
})
})