Browse Source

Fixed issue with songs.getSong io function

Kristian Vos 4 years ago
parent
commit
3df3ef9252
1 changed files with 8 additions and 3 deletions
  1. 8 3
      backend/logic/actions/songs.js

+ 8 - 3
backend/logic/actions/songs.js

@@ -244,12 +244,17 @@ module.exports = {
      * @param cb
      */
     getSong: hooks.adminRequired((session, songId, cb) => {
-        console.log(songId);
-
         async.waterfall(
             [
                 (next) => {
-                    song.getSong(songId, next);
+                    songs
+                        .runJob("GET_SONG_FROM_ID", { songId: songId })
+                        .then(song => {
+                            next(null, song);
+                        })
+                        .catch(err => {
+                            next(err);
+                        });
                 },
             ],
             async (err, song) => {