api.js refactor using classes (#250)

Refactor api.js into an api module where endpoint specific models can be imported and used in components.
This commit is contained in:
Michael Abashian
2019-06-07 15:48:09 -04:00
committed by GitHub
parent a8c51670af
commit 2ae93261d1
51 changed files with 839 additions and 727 deletions

View File

@@ -70,10 +70,6 @@ const defaultContexts = {
toJSON: () => '/router/',
},
network: {
api: {
getConfig: () => {},
toJSON: () => '/api/',
},
handleHttpError: () => {},
},
dialog: {}
@@ -146,7 +142,6 @@ export function mountWithContexts (node, options = {}) {
history: shape({}).isRequired,
}),
network: shape({
api: shape({}).isRequired,
handleHttpError: func.isRequired,
}),
dialog: shape({