|
|
|
@ -36,8 +36,12 @@ function login(data, type = "", typeWeb) { |
|
|
|
|
return (dispatch) => { |
|
|
|
|
let url_call_api = "/login"; |
|
|
|
|
let method = "POST"; |
|
|
|
|
return apiCaller(url_call_api, method, data, null, false).then( |
|
|
|
|
return apiCaller(url_call_api, method, data, null, false, configConstants.API_URL_SETEST, true, true).then( |
|
|
|
|
async (data) => { |
|
|
|
|
if(!data?.status) { |
|
|
|
|
dispatch(alertActions.error({ 'message': typeof data?.msg === 'string' ? data?.msg : Object.values(data?.msg)?.join('\n'), 'screen': userConstants.SCREEN_LOGIN })); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let user = data; |
|
|
|
|
user.isLogin = true; |
|
|
|
|
dispatch({ |
|
|
|
|