Better routes

This commit is contained in:
Federico Kereki
2018-05-10 21:01:53 -03:00
parent 1c83954d83
commit bacc913803
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -10,15 +10,15 @@ routerCities.get("/MVD", (req, res) => {
}); });
routerCities.get("/:id", (req, res) => { routerCities.get("/:id", (req, res) => {
res.send(`GET City... path=${req.originalUrl}`); res.send(`GET City... ${req.params.id}`);
}); });
routerCities.delete("/:id", (req, res) => { routerCities.delete("/:id", (req, res) => {
res.send(`DELETE City... path=${req.originalUrl}`); res.send(`DELETE City... ${req.params.id}`);
}); });
routerCities.post("/", (req, res) => { routerCities.post("/", (req, res) => {
res.send(`POST City... path=${req.originalUrl}`); res.send(`POST City... ${req.params.id}`);
}); });
routerCities.put("/:id", (req, res) => { routerCities.put("/:id", (req, res) => {
+1 -1
View File
@@ -9,7 +9,7 @@ routerCountries.get("/", (req, res) => {
res.send(`All countries... path=${req.originalUrl}`); res.send(`All countries... path=${req.originalUrl}`);
}); });
routerCountries.get("/UY", (req, res) => { routerCountries.get("/URUGUAY", (req, res) => {
res.send(`GET UY (Uruguay)... path=${req.originalUrl}`); res.send(`GET UY (Uruguay)... path=${req.originalUrl}`);
}); });