{"size": 673, "ext": "js", "max_stars_repo_path": "src/actions/auth.js", "max_stars_repo_name": "jsdelivrbot/we-resist-dashboard", "max_stars_repo_stars_event_min_datetime": "2019-04-08T10:45:17.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-08T10:45:17.000Z", "max_issues_repo_path": "src/actions/auth.js", "max_issues_repo_name": "jsdelivrbot/we-resist-dashboard", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/actions/auth.js", "max_forks_repo_name": "jsdelivrbot/we-resist-dashboard", "max_forks_repo_forks_event_min_datetime": "2018-12-08T08:00:29.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-08T08:00:29.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 20.3939393939, "max_line_length": 48, "alphanum_fraction": 0.5943536404}
import * as constants from '../constants/auth'

export const initiate = data => dispatch => {
    const action = {
        type: constants.AUTH_INITIATED,
        payload: data
    }
    dispatch(action)
}

export const login = data => dispatch => {
    const action = {
        type: constants.AUTH_SUCCESS,
        payload: data 
    }
    dispatch(action)
}

export const logout = data => dispatch => {
    const action = {
        type: constants.AUTH_FAIL,
        payload: data
    }
    dispatch(action)
}

export const assign_role = data => dispatch => {
    const action = {
        type: constants.ROLE_ASSIGNED,
        payload: data
    }
    dispatch(action)
}