Rev 3476 | Rev 3658 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import { api } from '@api';export const addComment = async (url, comment) => {try {return await api.post(url, comment);} catch (error) {console.log(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.log(error);throw new Error('Ha ocurrido un error al eliminar el comentario, por favor intente más tarde.');}};export const saveKnowledge = async (url, knowledge) => {try {return await api.post(url, knowledge);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al guardar el conocimiento, por favor intente más tarde.');}};export const deleteKnowledge = async (url) => {try {return await api.post(url);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al eliminar el conocimiento, por favor intente más tarde.');}};export const getKnowledge = async (url) => {try {return await api.get(url);} catch (error) {console.error(error);throw new Error('Ha ocurrido un error al obtener el conocimiento, por favor intente más tarde.');}};