2015-07-13 00:25:01 -07:00
|
|
|
import Fetchr from 'fetchr';
|
2015-07-24 17:52:07 -07:00
|
|
|
import getUserServices from '../services/user';
|
2018-02-20 13:07:32 +00:00
|
|
|
import getMapUiServices from '../services/mapUi';
|
2018-02-23 12:20:13 +00:00
|
|
|
import getChallengesForBlockService from '../services/challenge';
|
2015-07-13 00:25:01 -07:00
|
|
|
|
|
|
|
export default function bootServices(app) {
|
2015-07-25 15:42:03 -07:00
|
|
|
|
2018-02-23 12:20:13 +00:00
|
|
|
const challenge = getChallengesForBlockService(app);
|
2018-02-23 17:08:42 +00:00
|
|
|
const mapUi = getMapUiServices(app);
|
|
|
|
const user = getUserServices(app);
|
2018-02-23 12:20:13 +00:00
|
|
|
|
|
|
|
Fetchr.registerFetcher(challenge);
|
2018-02-23 17:08:42 +00:00
|
|
|
Fetchr.registerFetcher(mapUi);
|
|
|
|
Fetchr.registerFetcher(user);
|
2018-02-23 12:20:13 +00:00
|
|
|
|
2015-07-13 00:25:01 -07:00
|
|
|
app.use('/services', Fetchr.middleware());
|
|
|
|
}
|