Skip to content

Commit

Permalink
....
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayroid committed Oct 30, 2023
1 parent 1b71f37 commit db625b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/userRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const { VERIFYTOKEN } = require("../middlewares/jwtAuthMW");

// CREATING ROUTER
const USER = express.Router();
var SAPIDS = new Array();

// API ENDPOINTS
USER.get("/test", (req, res) => {
Expand All @@ -52,9 +53,13 @@ USER.post("/deleteUser", VERIFYTOKEN, DELETEUSER);
USER.post("/logout", VERIFYTOKEN, LOGOUTUSER);
USER.post("/update", (req, res) => {
const { sapid } = req.body;
SAPIDS.push([sapid, Date.now()]);
console.log(sapid);
res.send("Updated!");
});
USER.post("getUpdate", (req, res) => {
res.send(SAPIDS[SAPIDS.length - 1]);
});

// PARKING ROUTES
// USER.post("/raiseIssue", RAISEISSUE);
Expand Down

0 comments on commit db625b0

Please sign in to comment.