Remove remaining unused routes
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
7d51bc002b
commit
2c482aea6a
12
app.js
12
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("/api/v2/user", user2Rtr); // API Version 2
|
||||||
app.use("/misc", miscRtr); // Non public-api endpoints (Stats, Issue, etc.)
|
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) =>
|
app.use("/api/v1/auth/test", authenticate, (req, res) =>
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
status: "ok",
|
status: "ok",
|
||||||
message: "Authentication successful",
|
message: "Authentication successful",
|
||||||
})
|
})
|
||||||
); // Returns 401 if auth failed, 200 if successful.
|
); // Returns 401 if auth failed, 200 if successful.
|
||||||
app.use("/api/v1/train", authenticate, trainRtr);
|
|
||||||
|
|
||||||
// Number of proxies:
|
// Number of proxies:
|
||||||
app.set("trust proxy", 4);
|
app.set("trust proxy", 4);
|
||||||
|
@ -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;
|
|
Loading…
Reference in New Issue
Block a user