Skip to content

Commit

Permalink
Merge pull request #333 from Greenstand/remove-planter-identifier
Browse files Browse the repository at this point in the history
fix: use delete to remove key
  • Loading branch information
ZavenArra authored Aug 5, 2021
2 parents 6b6d43a + 94ad2d8 commit e42d2a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ app.get("/tree", async function (req, res){
} else if(treeName){
treeDetail = await tree.getTreeByName(treeName);
} else {
console.warn("no tree id", treeId);
res.status(400).json({message:"no tree id"});
console.warn("tree_id did not match any record", treeId);
res.status(400).json({message:"tree_id did not match any record"});
}
treeDetail.planter_identifier = "";
delete treeDetail.planter_identifier;

res.status(200).json(treeDetail);

Expand Down

0 comments on commit e42d2a2

Please sign in to comment.