Skip to content

Commit

Permalink
fix: Set Planter Manager not update the selfie without Tree Manager R…
Browse files Browse the repository at this point in the history
…ole (#83)

* feat: set planter manager not update the selfie without tree manager role

* feat: change name of planter selfies query
  • Loading branch information
tranquanghuy0801 authored May 16, 2021
1 parent 424aebf commit b3f6bbe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/api/planters.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ export default {
order: 'timeUpdated DESC',
limit: 100,
fields: ['planterPhotoUrl'],
where: { planterId, planterPhotoUrl: { neq: null } },
};

const treeQuery = `${
const planterSelfiesQuery = `${
process.env.REACT_APP_API_ROOT
}/api/${getOrganization()}trees/?filter=${JSON.stringify(filter)}`;
}/api/${getOrganization()}planter/${planterId}/selfies/?filter=${JSON.stringify(
filter,
)}`;

return fetch(treeQuery, {
return fetch(planterSelfiesQuery, {
method: 'GET',
headers: {
'content-type': 'application/json',
Expand Down

0 comments on commit b3f6bbe

Please sign in to comment.