newStaffLDB-API #48

Merged
fred.boniface merged 85 commits from newStaffLDB-API into main 2023-10-03 21:35:03 +01:00
3 changed files with 9 additions and 45 deletions
Showing only changes of commit 61648602bd - Show all commits

18
app.js
View File

@ -82,17 +82,17 @@ app.use("/api/v2/user", user2Rtr); // API Version 2
app.use("/misc", miscRtr); // Non public-api endpoints (Stats, Issue, etc.)
// Unauthenticated Routes
app.use("/api/v1/list", listRtr);
app.use("/api/v1/ldb", ldbRtr);
app.use("/api/v1/kube", kubeRtr);
app.use("/api/v1/find", findRtr);
app.use("/api/v1/issue", issueRtr);
app.use("/api/v1/stats", statRtr);
app.use("/api/v1/register", regRtr);
//app.use("/api/v1/list", listRtr); - Remove v1 List API - list.routes
//app.use("/api/v1/ldb", ldbRtr); - Remove v1 LDB API
//app.use("/api/v1/kube", kubeRtr); - Remove v1 Kube API
//app.use("/api/v1/find", findRtr); - Remove v1 Find API
//app.use("/api/v1/issue", issueRtr); - Remove v1 Issue API
//app.use("/api/v1/stats", statRtr); - Remove v1 Stats API
//app.use("/api/v1/register", regRtr); - Remove v1 Register API
// Authented Routes
app.use("/api/v1/ldbs", authenticate, ldbsRtr);
app.use("/api/v1/pis", authenticate, pisRtr);
//app.use("/api/v1/ldbs", authenticate, ldbsRtr); - Remove v1 LDBS API
//app.use("/api/v1/pis", authenticate, pisRtr); - Remove v1 PIS API
app.use("/api/v1/auth/test", authenticate, (req, res) =>
res.status(200).json({
status: "ok",

View File

@ -1,8 +0,0 @@
const express = require("express");
const router = express.Router();
// Controller Imports
// Routes
module.exports = router;

View File

@ -1,28 +0,0 @@
const express = require("express");
const router = express.Router();
/* Controller Imports */
// Live
// Timetable
// Ref
// User
/* Routes */
// Live
router.get("/live/station/:id/:type");
router.get("/live/train/:searchType/:id");
// Timetable
router.get("/timetable/train/:date/:searchType/:id");
// User
router.post("/user");
router.get("/user/:uuid");
router.delete("/user/:uuid");
module.exports = router;