diff options
Diffstat (limited to 'src/server/youtubeApi/youtubeApiSample.js')
-rw-r--r-- | src/server/youtubeApi/youtubeApiSample.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/youtubeApi/youtubeApiSample.js b/src/server/youtubeApi/youtubeApiSample.js index cd2e89cae..e95f99015 100644 --- a/src/server/youtubeApi/youtubeApiSample.js +++ b/src/server/youtubeApi/youtubeApiSample.js @@ -29,8 +29,8 @@ module.exports.authorizedGetChannel = (apiKey) => { authorize(JSON.parse(apiKey), getChannel); } -module.exports.authorizedGetVideos = (apiKey, userInput) => { - authorize(JSON.parse(apiKey), getSampleVideos, { userInput: userInput }); +module.exports.authorizedGetVideos = (apiKey, userInput, callBack) => { + authorize(JSON.parse(apiKey), getSampleVideos, { userInput: userInput, callBack: callBack }); } @@ -154,5 +154,6 @@ function getSampleVideos(auth, args) { } let videos = response.data.items; console.log('Videos found: ' + videos[0].id.videoId, " ", videos[0].snippet.title); + args.callBack(videos); }); }
\ No newline at end of file |