Rev 2203 |
|
Comparar con el anterior |
Ultima modificación |
Ver Log
|
| Rev |
Autor |
Línea Nro. |
Línea |
| 3719 |
stevensc |
1 |
import { axios } from '@app/utils';
|
|
|
2 |
|
|
|
3 |
export const checkSession = async (url) => {
|
|
|
4 |
const response = await axios.get(url);
|
|
|
5 |
const { data, success } = response.data;
|
|
|
6 |
|
|
|
7 |
if (!success) {
|
|
|
8 |
throw new Error('Error al obtener las notificaciones, por favor intente más tarde');
|
|
|
9 |
}
|
|
|
10 |
|
|
|
11 |
return {
|
|
|
12 |
messages: parseInt(data.total_messages),
|
|
|
13 |
notifications: parseInt(data.total_notifications)
|
|
|
14 |
};
|
|
|
15 |
};
|