We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
organzation
The capture page, here the planting organization is wrong:
planting organization
We need to use the stakeholder endpoint in query API to fetch the stakeholder, (organization here)
query
https://github.com/Greenstand/treetracker-query-api/blob/ebf9d2cf474fc5ed8479809d54140ce5f80e3170/docs/api/spec/query-api.yaml#L273-L284
Please write the integration test and mock the data, please verify the organization info on the result page (the info return from your mock object)
The text was updated successfully, but these errors were encountered:
async function serverSideData(params) { const { captureid } = params; const tree = await getCapturesById(captureid); const { planting_organization_id, grower_account_id, lat, lon } = tree; const grower = await getGrowerById(grower_account_id); const country = await getCountryByLatLon(lat, lon); let organization; // = await getStakeHolderById(planting_organization_id); if (planting_organization_id) { log.warn('load org from planting_orgniazation_id'); organization = await getStakeHolderById(planting_organization_id); } else if (grower.organization_id) { log.warn('load org from planter. organization_id'); organization = await getStakeHolderById(grower.organization_id); } else { log.warn('can not load org for tree:', tree, grower); } return { tree, grower, organization, country, }; }
we are already using the getStakeHolderById function to fetch the stakeholder if planting_organization_id is null
@dadiorchen the handling is already done, is there any thing else that needs to be changed in the code
Sorry, something went wrong.
No branches or pull requests
The capture page, here the
planting organization
is wrong:We need to use the stakeholder endpoint in
query
API to fetch the stakeholder, (organization here)https://github.com/Greenstand/treetracker-query-api/blob/ebf9d2cf474fc5ed8479809d54140ce5f80e3170/docs/api/spec/query-api.yaml#L273-L284
Please write the integration test and mock the data, please verify the organization info on the result page (the info return from your mock object)
The text was updated successfully, but these errors were encountered: