feat(map-service): Refactor out the map service

This commit is contained in:
Stuart Taylor
2018-02-23 17:08:42 +00:00
parent a7587ed6f0
commit 2143063084
5 changed files with 36 additions and 114 deletions

View File

@@ -1,20 +1,17 @@
import Fetchr from 'fetchr';
import getUserServices from '../services/user';
import getMapServices from '../services/map';
import getMapUiServices from '../services/mapUi';
import getChallengesForBlockService from '../services/challenge';
export default function bootServices(app) {
const user = getUserServices(app);
const map = getMapServices(app);
const mapUi = getMapUiServices(app);
const challenge = getChallengesForBlockService(app);
const mapUi = getMapUiServices(app);
const user = getUserServices(app);
Fetchr.registerFetcher(user);
Fetchr.registerFetcher(map);
Fetchr.registerFetcher(mapUi);
Fetchr.registerFetcher(challenge);
Fetchr.registerFetcher(mapUi);
Fetchr.registerFetcher(user);
app.use('/services', Fetchr.middleware());
}