diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts index d12871bdd..0ef659128 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts +++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts @@ -67,13 +67,18 @@ export const makeFetch = (method: 'POST'|'GET'|'PUT'|'PATCH'|'DEL }, }; - if (body !== null || typeof body !== 'undefined') { + console.log('for url '+url, body); + console.log('for url '+url, body !== null); + + if (body !== null && typeof body !== 'undefined') { Object.assign(opts, {body: JSON.stringify(body)}) } if (typeof options !== 'undefined') { opts = Object.assign(opts, options); } + console.log('will fetch', url); + console.log('content for ' + url, opts); return fetch(url, opts) .then(response => {