mg-library 1.0.386 → 1.0.388
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks.js +0 -1
- package/login.js +7 -3
- package/package.json +1 -1
package/blocks.js
CHANGED
package/login.js
CHANGED
@@ -2,7 +2,7 @@ import * as mgFunctionsLib from './functions.js';
|
|
2
2
|
import * as mgConstantsLib from './constants.js';
|
3
3
|
import axios from 'axios';
|
4
4
|
|
5
|
-
export function onPressLogin(dispatch, actions,
|
5
|
+
export function onPressLogin(dispatch, actions, app, apiUrl, language, data) {
|
6
6
|
try {
|
7
7
|
if (validateForm(data, language)) {
|
8
8
|
let requestData = {
|
@@ -20,9 +20,13 @@ export function onPressLogin(dispatch, actions, server, app, apiUrl, language, d
|
|
20
20
|
dispatch(actions.apiSuccess());
|
21
21
|
})
|
22
22
|
.catch(error => {
|
23
|
+
|
24
|
+
console.log(error.message);
|
25
|
+
console.log(error.code);
|
26
|
+
console.log(error.response);
|
27
|
+
|
23
28
|
dispatch(actions.apiError());
|
24
|
-
|
25
|
-
mgFunctionsLib.showToastError(error.message + ' - ' + error.code + ' - ' + error.status);
|
29
|
+
mgFunctionsLib.showToastError(mgFunctionsLib.i18nMessage('credentialsInvalid', language));
|
26
30
|
})
|
27
31
|
}
|
28
32
|
} catch (error) {
|