arnaucube
arnaucube/openEventsPlatformServerPublic Self-hosted repository
small fixes
arnaucode idoctnef@openmailbox.org
Mon, 26 Jun 2017 15:36:10 +0200
commit

bf34b9c6088ba85f93ec4e2deec2bdaf3e97a90c

parent

21757a4712909b8581cbb592bc08a2b46bfae238

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M controllers/eventController.js → controllers/eventController.js

@@ -30,7 +30,7 @@ },

{ name: "musica" } - ] + ]; res.status(200).jsonp(categoriesList); }; exports.getAllEvents = function(req, res) {

@@ -117,7 +117,9 @@ importFile(fileImg);

} function addNewEvent(req, res, user, imgUrl){ //adding random number to the url, to force ionic reload the image - req.body.img = imgUrl+ "?" + getRandomInt(1, 9999); + if(imgUrl!=""){ + req.body.img = imgUrl+ "?" + getRandomInt(1, 9999); + } var event = new eventModel({ title: req.body.title, description: req.body.description,