Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 14253 | Rev 15081 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 14253 Rev 14843
Línea 65... Línea 65...
65
 
65
 
66
	const getImport = () => {
66
	const getImport = () => {
67
		axios.post(import_link)
67
		axios.post(import_link)
68
			.then(({ data }) => {
68
			.then(({ data }) => {
-
 
69
				if (!data.success) {
-
 
70
					typeof data.data === 'string'
69
				if (!data.success) {
71
						?
70
					return dispatch(addNotification({
72
						dispatch(addNotification({
71
						style: 'danger',
73
							style: 'danger',
72
						msg: data.data
74
							msg: data.data
-
 
75
						}))
-
 
76
						: Object.entries(data.data).map(([key, value]) =>
-
 
77
							value.map(err =>
-
 
78
								dispatch(addNotification({
-
 
79
									style: 'danger',
-
 
80
									msg: `${key}: ${err}`
-
 
81
								}))
-
 
82
							)
-
 
83
						)
73
					}))
84
					return
Línea 74... Línea 85...
74
				}
85
				}
75
 
86
 
76
				dispatch(addNotification({
87
				dispatch(addNotification({