Skip to content

Commit

Permalink
✨: Add reducer for creating group
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrozsival committed Oct 29, 2017
1 parent 9e39e5b commit b6d4c67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/redux/modules/sisSupervisedCourses.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export const sisBindGroup = (courseId, data, userId, year, term) =>

const reducer = handleActions(
Object.assign({}, reduceActions, {
[actionTypes.CREATE]: (state, { meta: { userId, year, term }, payload }) =>
state.setIn(
['resources', userId, `${year}-${term}`],
createRecord({ state: resourceStatus.FULFILLED, data: fromJS(payload) })
),

[actionTypes.FETCH_PENDING]: (state, { meta: { userId, year, term } }) =>
state.setIn(['resources', userId, `${year}-${term}`], createRecord()),

Expand Down

0 comments on commit b6d4c67

Please sign in to comment.