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,41 +1,37 @@
const { currentRERequest } = require('../helpers/url');
const { currentRERequest } = require("../helpers/url");
const getNeighborhood = async (req, res) => {
const title = "U kojem naselju tražite nekretninu?";
const municipality = req.params.municipality;
const nextStep = req.query.nextStep || "/";
const title = "U kojem naselju tražite nekretninu?"
const municipality = req.params.municipality
const nextStep = req.query.nextStep || '/';
res.render('neighborhoodMap', {
nextStep,
municipality,
title
});
res.render("neighborhoodMap", {
nextStep,
municipality,
title
});
};
const postNeighborhood = async (req, res) => {
let request = await currentRERequest(req);
const northWest = [req.body.west, req.body.north];
const northEast = [req.body.east, req.body.north];
const southEast = [req.body.east, req.body.south];
const southWest = [req.body.west, req.body.south];
let request = await currentRERequest(req);
const northWest = [req.body.west, req.body.north];
const northEast = [req.body.east, req.body.north];
const southEast = [req.body.east, req.body.south];
const southWest = [req.body.west, req.body.south];
request.bounding_box = {
type: 'Polygon', coordinates: [
[northWest, northEast, southEast,
southWest, northWest]
]
};
await request.save();
request.bounding_box = {
type: "Polygon",
coordinates: [[northWest, northEast, southEast, southWest, northWest]]
};
await request.save();
const nextStepPage = req.query.nextStep || 'povrsina';
const nextStepUrl = `/${nextStepPage}/${request.uniqueId}`;
const nextStepPage = req.query.nextStep || "povrsina";
const nextStepUrl = `/${nextStepPage}/${request.uniqueId}`;
res.redirect(nextStepUrl);
res.redirect(nextStepUrl);
};
module.exports = {
getNeighborhood,
postNeighborhood
};
getNeighborhood,
postNeighborhood
};