Added a new model - does not work yet
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
const RealEstateRequest = require('../models/RealEstateRequest');
|
||||
|
||||
const vrsteNekretnina = [
|
||||
{ ime: "Kuća", id: "kuca" },
|
||||
{ ime: "Stan", id: "stan" },
|
||||
@@ -12,6 +14,18 @@ const getVrstaNekretnine = (req,res) => {
|
||||
});
|
||||
}
|
||||
|
||||
const postVrstaNekretnine = (req, res) => {
|
||||
RealEstateRequest.create({
|
||||
real_estate_type: req.body.vrsta
|
||||
}).then( (result) => {
|
||||
res.send("Result is " + JSON.stringify(result));
|
||||
}).catch( (e) => {
|
||||
res.send(e);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getVrstaNekretnine
|
||||
getVrstaNekretnine,
|
||||
postVrstaNekretnine
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user