Compare commits

..

No commits in common. "77948e93b67c99587c3eb5c0a4e1861e26a3e554" and "1051f05cce8cdfd71ebf871d1f7a940db77e50b5" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View File

@ -56,9 +56,9 @@ router
if (radio) {
if (req.files.file) {
resize_image_for_radio(req.files.file.data, (result) => {
radio.covers.cover32 = result.cover32;
radio.covers.cover64 = result.cover64;
radio.covers.cover128 = result.cover128;
radio.cover32 = result.cover32;
radio.cover64 = result.cover64;
radio.cover128 = result.cover128;
database.radios.update(radio);
res.json(radio).end();
});

View File

@ -23,9 +23,6 @@ exports.byId = function (id, callback) {
.collection("radios")
.findOne({ _id: ObjectId(id) }, (err, result) => {
if (err) throw err;
if (!result.covers) {
result.covers = {};
}
callback(result);
});
};
@ -66,7 +63,9 @@ exports.update = function (radio, callback) {
$set: {
name: radio.name,
url: radio.url,
covers: radio.covers
cover32: radio.cover32,
cover64: radio.cover64,
cover128: radio.cover128
}
},
{ upsert: false },