user_action.js 288 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 import Axios from 'axios'; import { LOGIN_USER } from './types'; export function loginUser(dataToSubmit) { const request = Axios.post('/api/users/login', dataToSubmit) .then( response => response.data ) return { type: LOGIN_USER, payload: request } }