|
@@ -82,7 +82,7 @@ module.exports = {
|
|
|
update: hooks.adminRequired((session, songId, updatedSong, cb, userId) => {
|
|
|
async.waterfall([
|
|
|
(next) => {
|
|
|
- db.models.queueSong.findOne({songId}, next);
|
|
|
+ db.models.queueSong.findOne({_id: songId}, next);
|
|
|
},
|
|
|
|
|
|
(song, next) => {
|
|
@@ -91,7 +91,7 @@ module.exports = {
|
|
|
let $set = {};
|
|
|
for (let prop in updatedSong) if (updatedSong[prop] !== song[prop]) $set[prop] = updatedSong[prop]; updated = true;
|
|
|
if (!updated) return next('No properties changed');
|
|
|
- db.models.queueSong.update({songId}, {$set}, next);
|
|
|
+ db.models.queueSong.update({_id: songId}, {$set}, next);
|
|
|
}
|
|
|
], (err) => {
|
|
|
if (err) {
|