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

Move devices under products #499

Merged
merged 2 commits into from
Jun 21, 2019
Merged

Move devices under products #499

merged 2 commits into from
Jun 21, 2019

Conversation

mobileoverlord
Copy link
Contributor

Sorry for the massive PR, but I'm unsure of how to make this change any smaller.

This PR does the following

  • Add product association to device
  • Move devices under products

The biggest impact that this has is that the api routes would change and require changes to nerves_hub_user_api

Device management endpoints moved from

/orgs/≤org_name>/devices

to

/orgs/≤org_name>/products/<product_name>/devices

|> Presence.list()
|> Map.get("#{device_id}", default)
|> merge_metas
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don’t think you need this merge_metas because the Presence.list/1 above will call fetch, which does the meta merging

ConnorRigby added a commit to FarmBot/Farmbot-Web-App that referenced this pull request Jun 21, 2019
* This addresses the upcoming change to the NervesHub API
  * nerves-hub/nerves_hub_web#499
* Update nerves_hub tests
ConnorRigby added a commit to FarmBot/Farmbot-Web-App that referenced this pull request Jun 21, 2019
* This addresses the upcoming change to the NervesHub API
  * nerves-hub/nerves_hub_web#499
* Update nerves_hub tests
@mobileoverlord mobileoverlord merged commit 24447e4 into master Jun 21, 2019
@mobileoverlord mobileoverlord deleted the product-device branch June 21, 2019 21:07
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

4 participants