diff --git a/app/controllers/real_estate_types.js b/app/controllers/realEstateTypes.js similarity index 64% rename from app/controllers/real_estate_types.js rename to app/controllers/realEstateTypes.js index 40f5d6e..c83449b 100644 --- a/app/controllers/real_estate_types.js +++ b/app/controllers/realEstateTypes.js @@ -1,19 +1,19 @@ const db = require('../models/index'); const realEstateTypes = [ - { ime: "Kuća", id: "kuca" }, - { ime: "Stan", id: "stan" }, + { ime: "Kuća", id: "kuca" }, + { ime: "Stan", id: "stan" }, { ime: "Vikendica", id: "vikendica" } ]; const getRealEstateTypes = (req,res) => { - const nextStep = req.query.nextStep; - res.render('real_estate_type', { - nextStep, - realEstateTypes: realEstateTypes + const nextStep = req.query.nextStep; + res.render('realEstateType', { + nextStep, + realEstateTypes: realEstateTypes }); -} +}; const postRealEstateTypes = (req, res) => { let nextStep = req.query.nextStep; @@ -21,14 +21,13 @@ const postRealEstateTypes = (req, res) => { realEstateType: req.body.realestatetype }).then( (result) => { nextStep = nextStep || `/grad/${result.uniqueId}`; - res.redirect(nextStep); + res.redirect(nextStep); }).catch( (e) => { res.send(e); - }); - -} + }); +}; -module.exports = { +module.exports = { getRealEstateTypes, postRealEstateTypes }; diff --git a/app/views/real_estate_type.ejs b/app/views/realEstateType.ejs similarity index 74% rename from app/views/real_estate_type.ejs rename to app/views/realEstateType.ejs index 1c93803..934a8c6 100644 --- a/app/views/real_estate_type.ejs +++ b/app/views/realEstateType.ejs @@ -1,3 +1,4 @@ +