| author | Alexandre Segura <mex.zktk@gmail.com> |
| Mon, 26 Jun 2017 18:15:44 +0200 | |
| changeset 95 | 7bc08467c726 |
| parent 89 | 06f609adfbf8 |
| child 100 | 6fd752d98933 |
| permissions | -rw-r--r-- |
|
44
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
1 |
import * as types from '../constants/actionTypes'; |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
2 |
|
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
3 |
export const loginSubmit = (username, password) => { |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
4 |
return { |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
5 |
type: types.AUTH_LOGIN_SUBMIT, |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
6 |
username, |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
7 |
password |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
8 |
}; |
|
3b20e2b584fe
Introduce authentication through API.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
9 |
} |
| 52 | 10 |
|
11 |
export const logout = () => { |
|
12 |
return { |
|
13 |
type: types.AUTH_LOGOUT |
|
14 |
}; |
|
15 |
} |
|
|
89
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
16 |
|
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
17 |
export const registerSubmit = (username, email, password1, password2) => { |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
18 |
return { |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
19 |
type: types.AUTH_REGISTER_SUBMIT, |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
20 |
username, |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
21 |
email, |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
22 |
password1, |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
23 |
password2 |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
24 |
}; |
|
06f609adfbf8
Add registration page.
Alexandre Segura <mex.zktk@gmail.com>
parents:
52
diff
changeset
|
25 |
} |