Rev 3665 |
Ir a la última revisión |
|
Ultima modificación |
Ver Log
|
| Rev |
Autor |
Línea Nro. |
Línea |
| 3661 |
stevensc |
1 |
import { api } from '@shared/libs';
|
|
|
2 |
|
|
|
3 |
export const addComment = async (url, comment) => {
|
|
|
4 |
try {
|
|
|
5 |
return await api.post(url, comment);
|
|
|
6 |
} catch (error) {
|
|
|
7 |
console.error(error);
|
|
|
8 |
throw new Error('Ha ocurrido un error al agregar el comentario, por favor intente más tarde.');
|
|
|
9 |
}
|
|
|
10 |
};
|
|
|
11 |
|
|
|
12 |
export const deleteComment = async (url) => {
|
|
|
13 |
try {
|
|
|
14 |
return await api.post(url);
|
|
|
15 |
} catch (error) {
|
|
|
16 |
console.error(error);
|
|
|
17 |
throw new Error('Ha ocurrido un error al eliminar el comentario, por favor intente más tarde.');
|
|
|
18 |
}
|
|
|
19 |
};
|