WiP Started input form.
This commit is contained in:
34
app/controllers/publishRealEstate.js
Normal file
34
app/controllers/publishRealEstate.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const { currentRealEstate } = require("../helpers/url");
|
||||
const { createRealEstate } = require("../helpers/db/realEstate");
|
||||
const { createKiviOriginal } = require("../helpers/db/kiviOriginal");
|
||||
|
||||
const { AD_CATEGORY, AD_TYPE, AD_AGENCY } = require("../common/enums");
|
||||
|
||||
const getPublishInputs = async (req, res) => {
|
||||
const realEstate = await currentRealEstate(req);
|
||||
|
||||
if (!realEstate || !realEstate.dataValues) {
|
||||
res.render("notFound", { title: " " });
|
||||
return;
|
||||
}
|
||||
|
||||
const title = "Podaci o nekretnini";
|
||||
|
||||
res.render("publishRealEstate", {
|
||||
title
|
||||
});
|
||||
};
|
||||
|
||||
const postPublishInputs = async (req, res) => {
|
||||
const realEstate = await currentRealEstate(req);
|
||||
|
||||
if (!realEstate || !realEstate.dataValues) {
|
||||
res.render("notFound", { title: " " });
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getPublishInputs,
|
||||
postPublishInputs
|
||||
};
|
||||
Reference in New Issue
Block a user