Proyectos de Subversion LeadersLinked - Backend

Rev

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

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