working changes

This commit is contained in:
Enstrayed
2025-04-17 22:41:08 -07:00
parent 8a2bd6ecc3
commit 4c0f140e9e
4 changed files with 128 additions and 102 deletions

15
routes/debug.js Normal file
View File

@@ -0,0 +1,15 @@
import { app, globalConfig } from "../index.js" // Get globals from index
import { checkToken } from "../liberals/auth.js"
import { logRequest } from "../liberals/logging.js"
app.get("/api/debugtokencheck", (rreq,rres) => {
checkToken(rreq.get("Authorization"),"etyd").then(authRes => {
if (authRes) {
rres.sendStatus(200)
} else {
rres.sendStatus(401)
}
})
})
export { app }