From 268e949c9a49cf8be60d0172722e4592530097ad Mon Sep 17 00:00:00 2001 From: cristiLuca Date: Tue, 21 Aug 2018 12:22:01 +0300 Subject: [PATCH] Fix for freeBusy when using next_page option --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index e8c4c10..99335be 100644 --- a/src/index.js +++ b/src/index.js @@ -212,7 +212,11 @@ cronofy.prototype.elevatedPermissions = function () { cronofy.prototype.freeBusy = function () { var details = this._parseArguments(arguments, ['access_token']); - return this._httpGet(details.options.next_page || '/v1/free_busy', details.options, details.callback); + if (details.options.next_page) { + return this._httpCall('GET', details.options.next_page, details.options, details.callback, ['access_token', 'next_page']); + } + + return this._httpGet('/v1/free_busy', details.options, details.callback); }; cronofy.prototype.listCalendars = function () {