From 7d2ab1a45ebe4099b2352898df915005decdcd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Mon, 5 Sep 2016 16:12:37 -0300 Subject: [PATCH] Use urlfor params --- src/backends/github/API.js | 3 ++- src/backends/netlify-git/API.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backends/github/API.js b/src/backends/github/API.js index a49a2585..453f3e89 100644 --- a/src/backends/github/API.js +++ b/src/backends/github/API.js @@ -105,7 +105,8 @@ export default class API { return cache.then((cached) => { if (cached && cached.expires > Date.now()) { return cached.data; } - return this.request(`${this.repoURL}/contents/${key}.json?ref=refs/meta/_netlify_cms`, { + return this.request(`${this.repoURL}/contents/${key}.json`, { + params: { ref: 'refs/meta/_netlify_cms' }, headers: { Accept: 'application/vnd.github.VERSION.raw' }, cache: 'no-store', }).then((result) => { diff --git a/src/backends/netlify-git/API.js b/src/backends/netlify-git/API.js index 8c072a30..ef16c56d 100644 --- a/src/backends/netlify-git/API.js +++ b/src/backends/netlify-git/API.js @@ -99,7 +99,8 @@ export default class API { return cache.then((cached) => { if (cached && cached.expires > Date.now()) { return cached.data; } - return this.request(`${this.repoURL}/files/${key}.json?ref=refs/meta/_netlify_cms`, { + return this.request(`${this.repoURL}/files/${key}.json`, { + params: { ref: 'refs/meta/_netlify_cms' }, headers: { Accept: 'application/vnd.github.VERSION.raw' }, cache: 'no-store', }).then((result) => {