Redux user actions
- Source:
Methods
(static) login(credentials, role, from)
Logs user in
Parameters:
Name | Type | Description |
---|---|---|
credentials |
Object | User's email and password |
role |
string | User's role |
from |
Object | User redirection path |
- Source:
(static) logout()
Logs user out
- Source:
(static) me(role)
Gets user profile information using user's role and token
Parameters:
Name | Type | Description |
---|---|---|
role |
string | user's role |
- Source:
(static) signup(user, role)
Signs user up
Parameters:
Name | Type | Description |
---|---|---|
user |
Object | Basic user information (name, email, password...) |
role |
string | User's role |
- Source:
(static) update(updateData, role)
Updates user profile information
Parameters:
Name | Type | Description |
---|---|---|
updateData |
Object | updated profile information |
role |
string | user's role |
- Source:
(inner) statusHandler(dispatch, response)
Logs out user if token or role is wrong
Parameters:
Name | Type | Description |
---|---|---|
dispatch |
function | dispatch function |
response |
Object | error response object |
- Source: