TimetableAPI-Upgrade #64

Merged
fred.boniface merged 36 commits from TimetableAPI-Upgrade into main 2024-02-11 15:53:17 +00:00
2 changed files with 0 additions and 31 deletions
Showing only changes of commit 2c482aea6a - Show all commits

12
app.js
View File

@ -72,25 +72,13 @@ app.use("/api/v2/timetable", tt2Rtr); // API Version 2
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); - 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); - 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",
message: "Authentication successful",
})
); // Returns 401 if auth failed, 200 if successful.
app.use("/api/v1/train", authenticate, trainRtr);
// Number of proxies:
app.set("trust proxy", 4);

View File

@ -1,19 +0,0 @@
const express = require("express");
const router = express.Router();
const trainController = require("../controllers/train.controllers");
/* GET programming languages. */
//router.get('/', programmingLanguagesController.get);
/* POST programming language */
//router.post('/', programmingLanguagesController.create);
/* PUT programming language */
//router.put('/:id', programmingLanguagesController.update);
/* DELETE programming language */
//router.delete('/:id', programmingLanguagesController.remove);
router.get("/headcode/today/:id", trainController.getByHeadcodeToday);
module.exports = router;