import { AxiosResponse } from 'axios' ; import { makeRequest } from '../makeRequest' ; EXPORTS export { getAllLikesFromDB , persistNewLikeToDB } ; api function returns { object } const getAllLikesFromDB = ( ) : Promise < AxiosResponse < { success : boolean ; totalLikes : number ; } > > => { return makeRequest ( { url : '/api/likes/' , method : 'GET' , } ) ; } ; api function returns { object } const persistNewLikeToDB = ( ) : Promise < AxiosResponse < { success : boolean ; } > > => { return makeRequest ( { url : '/api/likes' , method : 'POST' , headers : { 'Content-Type' : 'application/json' } , } ) ; } ;