| 7 | // Fetches a single user from Github API. |
| 8 | // Relies on the custom API middleware defined in ../middleware/api.js. |
| 9 | const fetchUser = login => ({ |
| 10 | [CALL_API]: { |
| 11 | types: [ USER_REQUEST, USER_SUCCESS, USER_FAILURE ], |
| 12 | endpoint: `users/${login}`, |
| 13 | schema: Schemas.USER |
| 14 | } |
| 15 | }) |
| 16 | |
| 17 | // Fetches a single user from Github API unless it is cached. |
| 18 | // Relies on Redux Thunk middleware. |