Guest User

Untitled

a guest
Jul 13th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import backend from '../backend';
  2.  
  3.  
  4. export const LOGIN_START = 'LOGIN_START';
  5. export const LOGIN_ERROR = 'LOGIN_ERROR';
  6. export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
  7.  
  8. export const CHANGE_USERNAME = 'CHANGE_USERNAME';
  9. export const CHANGE_PASSWORD = 'CHANGE_PASSWORD';
  10.  
  11.  
  12. const client = new backend()
  13.  
  14. export function doLogin(username, password) {
  15.  
  16. console.log('doLogin');
  17.  
  18. return dispatch => backend.doLogin();
  19.  
  20. }
  21.  
  22. export function changeUsername(username) {
  23.  
  24. return {
  25. type: CHANGE_USERNAME,
  26. username
  27. }
  28. }
  29.  
  30. export function changePassword(password) {
  31.  
  32. return {
  33. type: CHANGE_PASSWORD,
  34. password
  35. }
  36. }
Add Comment
Please, Sign In to add comment