Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3483 Rev 3642
Línea 2... Línea 2...
2
 
2
 
3
export const addComment = async (url, comment) => {
3
export const addComment = async (url, comment) => {
4
  try {
4
  try {
5
    return await api.post(url, comment);
5
    return await api.post(url, comment);
6
  } catch (error) {
6
  } catch (error) {
7
    console.log(error);
7
    console.error(error);
8
    throw new Error('Ha ocurrido un error al agregar el comentario, por favor intente más tarde.');
8
    throw new Error('Ha ocurrido un error al agregar el comentario, por favor intente más tarde.');
9
  }
9
  }
Línea 10... Línea 10...
10
};
10
};
11
 
11
 
12
export const deleteComment = async (url) => {
12
export const deleteComment = async (url) => {
13
  try {
13
  try {
14
    return await api.post(url);
14
    return await api.post(url);
15
  } catch (error) {
15
  } catch (error) {
16
    console.log(error);
16
    console.error(error);
17
    throw new Error('Ha ocurrido un error al eliminar el comentario, por favor intente más tarde.');
17
    throw new Error('Ha ocurrido un error al eliminar el comentario, por favor intente más tarde.');
Línea 18... Línea 18...
18
  }
18
  }