Better routes
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
@@ -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}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user