Use urlfor params

This commit is contained in:
Cássio Zen 2016-09-05 16:12:37 -03:00
parent 77f5e1d6fa
commit 7d2ab1a45e
2 changed files with 4 additions and 2 deletions

View File

@ -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) => {

View File

@ -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) => {