Asset API (#204)

Asset API
This commit is contained in:
Cássio Souza
2017-01-10 22:23:22 -02:00
committed by GitHub
parent 37f690fc44
commit a4d7622ade
52 changed files with 706 additions and 687 deletions

View File

@ -1,6 +1,5 @@
import TestRepoBackend from "./test-repo/implementation";
import GitHubBackend from "./github/implementation";
import NetlifyGitBackend from "./netlify-git/implementation";
import NetlifyAuthBackend from "./netlify-auth/implementation";
import { resolveFormat } from "../formats/formats";
import { selectListMethod, selectEntrySlug, selectEntryPath, selectAllowNewEntries } from "../reducers/collections";
@ -79,6 +78,8 @@ class Backend {
}
}
getToken = () => this.implementation.getToken();
listEntries(collection) {
const listMethod = this.implementation[selectListMethod(collection)];
return listMethod.call(this.implementation, collection)
@ -218,8 +219,6 @@ export function resolveBackend(config) {
return new Backend(new TestRepoBackend(config), authStore);
case "github":
return new Backend(new GitHubBackend(config), authStore);
case "netlify-git":
return new Backend(new NetlifyGitBackend(config), authStore);
case "netlify-auth":
return new Backend(new NetlifyAuthBackend(config), authStore);
default: