feat: connect to bff

This commit is contained in:
Ben Warzeski
2022-08-24 11:40:51 -04:00
parent 08141acd16
commit 1ec2e82c60
2 changed files with 3 additions and 27 deletions

View File

@@ -1,35 +1,9 @@
import { getConfig } from '@edx/frontend-platform';
import { get } from './utils';
import fakeData from 'data/services/lms/fakeData/courses';
/*
import { StrictDict } from 'utils';
import { locationId } from 'data/constants/app';
import { paramKeys } from './constants';
import urls from './urls';
import {
client,
get,
post,
stringifyUrl,
} from './utils';
*/
/*********************************************************************************
* GET Actions
*********************************************************************************/
const initializeList = () => {
const url = `${getConfig().LMS_BASE_URL}/learner/mock/home`;
console.log({ url });
get(url).then(console.log);
return Promise.resolve({
courses: [
...fakeData.courseRunData,
...fakeData.entitlementData,
],
...fakeData.globalData,
});
};
const initializeList = () => get(urls.init).then(({ data }) => data);
export default { initializeList };

View File

@@ -4,7 +4,9 @@ import { configuration } from 'config';
const baseUrl = `${configuration.LMS_BASE_URL}`;
const api = `${baseUrl}/api/`;
const init = `${api}/learner_home/mock/init`;
export default StrictDict({
api,
init,
});