import fetch from 'isomorphic-fetch'; import {BASE_URL} from '../config/config'; export const getSkill = (id)=>{ let url = `http://${BASE_URL}/skill/${id}` return fetch(url, {method: 'GET'}); } export const updateSkill = (skill)=>{ let id = (skill._id) ? skill._id : -1; let url = `http://${BASE_URL}/skill/${id}` return fetch(url, { method: 'PUT', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify(skill), }); }