feat: functional /mods endpoint (getAllMods)
This commit is contained in:
parent
0ee5eedcfd
commit
eb4be67c89
10 changed files with 55 additions and 9 deletions
|
|
@ -1,11 +1,20 @@
|
|||
const express = require("express");
|
||||
const controller = require("../controllers/mods");
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// List mods
|
||||
router.get("/list", async (req,res) => {
|
||||
router.get("/", async (req,res) => {
|
||||
console.debug("Accessing mods list");
|
||||
res.send("No list yet");
|
||||
res.send(controller.getAllMods());
|
||||
// res.send("No list yet");
|
||||
});
|
||||
|
||||
router.get("/:name", async (req,res) => {
|
||||
const name = req.params.name;
|
||||
console.debug("Accessing mod " + name)
|
||||
res.send("Not implemented");
|
||||
// res.send(name + " is not there yet");
|
||||
})
|
||||
|
||||
module.exports = router;
|
||||
Loading…
Add table
Add a link
Reference in a new issue