apply prettier on all files

This commit is contained in:
Bilal Catic
2019-09-05 11:14:54 +02:00
parent 719cf4d8f9
commit 60e618fd22
45 changed files with 1749 additions and 1621 deletions

View File

@@ -1,25 +1,25 @@
const { currentRERequest } = require('../helpers/url');
const { getRegions } = require('../helpers/codes');
const { currentRERequest } = require("../helpers/url");
const { getRegions } = require("../helpers/codes");
const regions = getRegions();
const getRegion = (req,res) => {
const title = "U kojoj regiji tražite nekretninu?"
res.render('region', { regions, title });
const getRegion = (req, res) => {
const title = "U kojoj regiji tražite nekretninu?";
res.render("region", { regions, title });
};
const postRegion = async (req, res) => {
const request = await currentRERequest(req);
const nextStepQueryParam = req.query.nextStep ? '?nextStep=pregled' : '';
const nextStepPage = req.query.nextStep || 'mjesto';
const nextStepQueryParam = req.query.nextStep ? "?nextStep=pregled" : "";
const nextStepPage = req.query.nextStep || "mjesto";
const nextStepUrl = `/${nextStepPage}/${request.uniqueId}${nextStepQueryParam}`;
request.region = req.body.region;
request.municipality = null;
await request.save();
res.redirect(nextStepUrl)
res.redirect(nextStepUrl);
};
module.exports = {