mirror of
https://github.com/arnaucube/openEventsPlatformServer.git
synced 2026-02-06 19:26:39 +01:00
small fixes
This commit is contained in:
@@ -30,7 +30,7 @@ exports.getCategoriesList = function(req, res) {
|
|||||||
{
|
{
|
||||||
name: "musica"
|
name: "musica"
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
res.status(200).jsonp(categoriesList);
|
res.status(200).jsonp(categoriesList);
|
||||||
};
|
};
|
||||||
exports.getAllEvents = function(req, res) {
|
exports.getAllEvents = function(req, res) {
|
||||||
@@ -117,7 +117,9 @@ function postImage(req, res, user, filename, fileImg) {
|
|||||||
}
|
}
|
||||||
function addNewEvent(req, res, user, imgUrl){
|
function addNewEvent(req, res, user, imgUrl){
|
||||||
//adding random number to the url, to force ionic reload the image
|
//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({
|
var event = new eventModel({
|
||||||
title: req.body.title,
|
title: req.body.title,
|
||||||
description: req.body.description,
|
description: req.body.description,
|
||||||
|
|||||||
Reference in New Issue
Block a user