change cover structure in radio fix #15
This commit is contained in:
@@ -23,6 +23,9 @@ exports.byId = function (id, callback) {
|
||||
.collection("radios")
|
||||
.findOne({ _id: ObjectId(id) }, (err, result) => {
|
||||
if (err) throw err;
|
||||
if (!result.covers) {
|
||||
result.covers = {};
|
||||
}
|
||||
callback(result);
|
||||
});
|
||||
};
|
||||
@@ -63,9 +66,7 @@ exports.update = function (radio, callback) {
|
||||
$set: {
|
||||
name: radio.name,
|
||||
url: radio.url,
|
||||
cover32: radio.cover32,
|
||||
cover64: radio.cover64,
|
||||
cover128: radio.cover128
|
||||
covers: radio.covers
|
||||
}
|
||||
},
|
||||
{ upsert: false },
|
||||
|
||||
Reference in New Issue
Block a user