import API from './APIUtils' ; import { IProfile } from '../types' ; type Profile = { profile : IProfile ; } ; export function followProfile ( username ) { return API . post < Profile > ( `/profiles/${ username }/follow` ) ; } export function getProfile ( username ) { return API . get < Profile > ( `/profiles/${ username }` ) ; } export function unfollowProfile ( username ) { return API . delete < Profile > ( `/profiles/${ username }/follow` ) ; }