Rev 3665 | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import { api } from '@shared/libs';export const addComment = async (url, comment) => {try {return await api.post(url, comment);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al agregar el comentario, por favor intente más tarde.');}};export const deleteComment = async (url) => {try {return await api.post(url);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al eliminar el comentario, por favor intente más tarde.');}};export const getComments = async (url) => {try {return await api.get(url);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al obtener los comentarios, por favor intente más tarde.');}};