user_actions.js 290 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 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 } }