From 2c482aea6aca62a6288c802c69f48ea0f91a3950 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 12 Oct 2023 21:00:48 +0100 Subject: [PATCH] Remove remaining unused routes Signed-off-by: Fred Boniface --- app.js | 12 ------------ src/routes/train.routes.ts | 19 ------------------- 2 files changed, 31 deletions(-) delete mode 100644 src/routes/train.routes.ts diff --git a/app.js b/app.js index fc95609..3e8e348 100644 --- a/app.js +++ b/app.js @@ -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); diff --git a/src/routes/train.routes.ts b/src/routes/train.routes.ts deleted file mode 100644 index 02969b7..0000000 --- a/src/routes/train.routes.ts +++ /dev/null @@ -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;