picture display ready

This commit is contained in:
Senad Uka
2016-10-08 16:02:59 +02:00
parent d469c91e3e
commit 4b2b9526de
10 changed files with 97 additions and 22 deletions

View File

@@ -130,21 +130,6 @@ Api.addRoute('picture/:id', {
'time': new Date()
}
});
},
get: function() {
var id = this.urlParams.id;
var res = this.response;
var picture_src = "/images/noImage.png";
var pictureEntry = Picture.findOne({
controller_id: id
});
if (pictureEntry) {
var imageData = pictureEntry.picture_base64;
picture_src = "data:image/jpeg;charset=utf-8;base64," + imageData;
}
return {
picture: picture_src
};
}
});