Fixed bug related to map region edit

This commit is contained in:
Nedim Uka
2019-05-27 15:17:41 +02:00
parent 5bf95e0594
commit f4baec23cf
2 changed files with 8 additions and 5 deletions

View File

@@ -3,7 +3,6 @@ const { currentRERequest } = require('../helpers/url');
const getNeighborhood = async (req, res) => {
const municipality = req.params.municipality
const nextStep = req.query.nextStep || '/';
res.render('neighborhoodMap', {
nextStep,
municipality
@@ -25,8 +24,11 @@ const postNeighborhood = async (req, res) => {
]
};
await request.save();
const nextStep = req.query.nextStep || `/povrsina/${request.uniqueId}`;
res.redirect(nextStep);
const nextStepPage = req.query.nextStep || 'povrsina';
const nextStepUrl = `/${nextStepPage}/${request.uniqueId}`;
res.redirect(nextStepUrl);
};
module.exports = {