Skip to content

Commit 94bb7b5

Browse files
committed
reuse action type
1 parent b013add commit 94bb7b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/client/src/actions/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ export const fetchUser = () => async dispatch => {
66

77
dispatch({ type: FETCH_USER, payload: res.data });
88
};
9+
10+
export const handleToken = token => async dispatch => {
11+
const res = await axios.post('/api/stripe', token);
12+
13+
dispatch({ type: FETCH_USER, payload: res.data });
14+
};

0 commit comments

Comments
 (0)