create separate file for routes
This commit is contained in:
62
app/routes/index.js
Normal file
62
app/routes/index.js
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
|
||||
const express = require("express");
|
||||
|
||||
const welcome = require("../controllers/welcome").getWelcome;
|
||||
const {
|
||||
getRealEstateTypes,
|
||||
postRealEstateTypes
|
||||
} = require("../controllers/realEstateTypes");
|
||||
const { getSize, postSize } = require("../controllers/sizes");
|
||||
const { getGardenSize, postGardenSize } = require("../controllers/gardenSizes");
|
||||
const { getPrice, postPrice } = require("../controllers/prices");
|
||||
const {
|
||||
getQueryReview,
|
||||
postQueryReview
|
||||
} = require("../controllers/queryReview");
|
||||
const {
|
||||
getQuerySubmit,
|
||||
postQuerySubmit
|
||||
} = require("../controllers/querySubmit");
|
||||
const { getGoAgain } = require("../controllers/goAgain");
|
||||
const { getLocation, postLocation } = require("../controllers/location");
|
||||
const { getUnsubscribe } = require("../controllers/unsubscribe");
|
||||
const { getRealEstates } = require("../controllers/realEstates");
|
||||
const { redirect } = require("../controllers/redirect");
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get("/", welcome);
|
||||
router.get("/vrstanekretnine/:request_id", getRealEstateTypes);
|
||||
router.get("/vrstanekretnine", getRealEstateTypes);
|
||||
|
||||
router.post("/vrstanekretnine/:request_id", postRealEstateTypes);
|
||||
router.post("/vrstanekretnine", postRealEstateTypes);
|
||||
|
||||
router.get("/lokacija/:request_id", getLocation);
|
||||
router.post("/lokacija/:request_id", postLocation);
|
||||
|
||||
router.get("/povrsina/:request_id", getSize);
|
||||
router.post("/povrsina/:request_id", postSize);
|
||||
|
||||
router.get("/okucnica/:request_id", getGardenSize);
|
||||
router.post("/okucnica/:request_id", postGardenSize);
|
||||
|
||||
router.get("/cijena/:request_id", getPrice);
|
||||
router.post("/cijena/:request_id", postPrice);
|
||||
|
||||
router.get("/pregled/:request_id", getQueryReview);
|
||||
router.post("/pregled/:request_id", postQueryReview);
|
||||
|
||||
router.get("/posalji/:request_id", getQuerySubmit);
|
||||
router.post("/posalji/:request_id", postQuerySubmit);
|
||||
|
||||
router.get("/odjava/:request_id", getUnsubscribe);
|
||||
|
||||
router.get("/ponovo", getGoAgain);
|
||||
|
||||
router.get("/nekretnine/:request_id", getRealEstates);
|
||||
|
||||
router.get("/redirect/:id", redirect);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user