Skip to content
New issue

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

id-missing #124

Merged
merged 2 commits into from
Jan 26, 2023
Merged

id-missing #124

merged 2 commits into from
Jan 26, 2023

Conversation

zoobot
Copy link
Member

@zoobot zoobot commented Jan 26, 2023

No description provided.

@zoobot
Copy link
Member Author

zoobot commented Jan 26, 2023

fixes dev id bug

@@ -46,10 +46,12 @@ treesRouter.post('/', async (req, res) => {

// creates id here when new trees are planted in the ground
// haven't gone to vector tiles yet.
const id = req.body.id ? req.body.id : createIdForTree(req.body);
const id = req?.body?.id ? req.body.id : createIdForTree(req.body);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Couldn't we do req?.body?.id ?? createIdForTree(req.body);?

Otherwise, looks good to me!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah nice will do

@zoobot zoobot merged commit 10161fa into main Jan 26, 2023
@zoobot zoobot deleted the zoobot/bugfix/id-missing branch January 26, 2023 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants