diff --git a/src/data/redux/thunkActions/app.js b/src/data/redux/thunkActions/app.js index 550d12a..8452a50 100644 --- a/src/data/redux/thunkActions/app.js +++ b/src/data/redux/thunkActions/app.js @@ -7,7 +7,7 @@ import requests from './requests'; // import { locationId } from 'data/constants/app'; // import { } from './requests'; -// import * as module from './app'; +import * as module from './app'; /** * initialize the app, loading ora and course metadata from the api, and loading the initial @@ -47,9 +47,14 @@ export const updateEntitlementSession = (cardId, selection) => (dispatch, getSta }); }; +export const unenroll = (courseId) => (dispatch, getState) => post( + selectors.app.courseCard.courseRun(getState(), courseId), +).then(() => dispatch(module.refreshList())); + export default StrictDict({ initialize, refreshList, sendConfirmEmail, updateEntitlementSession, + unenroll, });