aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/actions')
-rw-r--r--src/client/react/actions/view.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/react/actions/view.js b/src/client/react/actions/view.js
index f9f0be2..79ec143 100644
--- a/src/client/react/actions/view.js
+++ b/src/client/react/actions/view.js
@@ -1,17 +1,19 @@
// eslint-disable-next-line import/prefer-default-export
-export const fetchSchedule = user => (dispatch) => {
+export const fetchSchedule = (user, week) => (dispatch) => {
dispatch({
type: 'VIEW/FETCH_SCHEDULE_REQUEST',
user,
+ week,
});
- fetch(`/get/${user}`).then(
+ fetch(`/get/${user}?week=${week}`).then(
// success
(r) => {
r.text().then((htmlStr) => {
dispatch({
type: 'VIEW/FETCH_SCHEDULE_SUCCESS',
user,
+ week,
htmlStr,
});
});
@@ -21,6 +23,7 @@ export const fetchSchedule = user => (dispatch) => {
() => {
dispatch({
type: 'VIEW/FETCH_SCHEDULE_FAILURE',
+ week,
user,
});
},