Rev 3642 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import { api } from '@shared/libs';export const addCapsuleComment = async (url, { comment, rating }) => {try {const { message, comment: newComment, capsule } = await api.post(url, { comment, rating });return { message, comment: newComment, capsule };} catch (error) {console.log(error);throw new Error('Error al agregar el comentario');}};export const deleteCapsuleComment = async (url) => {try {const { message, capsule } = await api.delete(url);return { message, capsule };} catch (error) {console.log(error);throw new Error('Error al eliminar el comentario');}};