Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 12528 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 12528 Rev 14838
Línea 36... Línea 36...
36
 
36
 
37
		axios.get(url, { params: { ...params } })
37
		axios.get(url, { params: { ...params } })
38
			.then(({ data }) => {
38
			.then(({ data }) => {
39
				if (!data.success) {
39
				if (!data.success) {
40
					dispatch(addNotification({
40
					dispatch(addNotification({
41
						style: 'error',
41
						style: 'danger',
42
						msg: 'Ha ocurrido un error'
42
						msg: 'Ha ocurrido un error'
43
					}))
43
					}))
Línea 44... Línea 44...
44
				}
44
				}
45
 
45
 
46
				setItems(data.data.items)
46
				setItems(data.data.items)
47
				setTotal(data.data.total)
47
				setTotal(data.data.total)
48
				setPages({ ...pages, last: Math.ceil(data.data.total / dataLength) })
48
				setPages({ ...pages, last: Math.ceil(data.data.total / dataLength) })
49
			})
49
			})
50
			.catch(() => dispatch(addNotification({
50
			.catch(() => dispatch(addNotification({
51
				style: 'error',
51
				style: 'danger',
52
				msg: 'Ha ocurrido un error'
52
				msg: 'Ha ocurrido un error'
Línea 53... Línea 53...
53
			})))
53
			})))