import fetch from 'isomorphic-fetch'; import {BASE_URL} from '../config'; export const getAllIntents = ()=>{ let url = `http://${BASE_URL}/intents` return fetch(url, {method: 'GET'}); } export const deleteIntent = id=>{ let url = `http://${BASE_URL}/deleteIntent/${id}` return fetch(url, {method: 'GET'}); } export const updateIntent = (id,intent)=>{ let url = `http://${BASE_URL}/updateIntent/${id}` return fetch(url, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify(intent), }); }