small fixes

This commit is contained in:
arnaucode
2017-06-26 15:36:10 +02:00
parent 21757a4712
commit bf34b9c608

View File

@@ -30,7 +30,7 @@ exports.getCategoriesList = function(req, res) {
{
name: "musica"
}
]
];
res.status(200).jsonp(categoriesList);
};
exports.getAllEvents = function(req, res) {
@@ -117,7 +117,9 @@ function postImage(req, res, user, filename, fileImg) {
}
function addNewEvent(req, res, user, imgUrl){
//adding random number to the url, to force ionic reload the image
if(imgUrl!=""){
req.body.img = imgUrl+ "?" + getRandomInt(1, 9999);
}
var event = new eventModel({
title: req.body.title,
description: req.body.description,