Skip to content

Commit

Permalink
Create Farmer Statistics Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexEntrepreneur committed Sep 17, 2019
1 parent 1b2bc46 commit cc5ab2d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/utils/handlers/farmerHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,13 @@ export const deleteFarmerHandler = farmerId => {
throw new Error(error);
});
};

export const getfarmerStatisticsHandler = () => {
const token = getToken();
return axios
.get(pathObj.getFarmersStatistic, setHeaders(token))
.then(res => res.data)
.catch(error => {
throw new Error(error);
});
};

0 comments on commit cc5ab2d

Please sign in to comment.