Skip to content

Avoid calling cloud API if vid or pid are invalid #439

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 15, 2019
Merged

Conversation

masci
Copy link
Contributor

@masci masci commented Oct 11, 2019

When the USB vid or pid are obviously wrong, avoid calling the API, sparing users' bandwidth and reducing useless pressure on the backend.

I moved vid/pid validation inside apiByVidPid to keep the List logic tidy and clean. A specific test case was added to cover the case vid or pid are invalid.

Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

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

"0x0420", "0x0069" ®️

@masci masci merged commit 1ceab8b into master Oct 15, 2019
@masci masci deleted the massi/vidpidapi branch October 15, 2019 13:40
howjmay pushed a commit to howjmay/arduino-cli that referenced this pull request Nov 13, 2019
* avoid calling cloud API if vid or pid are invalid

* user regex
howjmay pushed a commit to howjmay/arduino-cli that referenced this pull request Nov 13, 2019
* avoid calling cloud API if vid or pid are invalid

* user regex
howjmay pushed a commit to howjmay/arduino-cli that referenced this pull request Nov 13, 2019
* avoid calling cloud API if vid or pid are invalid

* user regex
howjmay pushed a commit to howjmay/arduino-cli that referenced this pull request Nov 13, 2019
* avoid calling cloud API if vid or pid are invalid

* user regex
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants