mozilla-magnet / magnet-services

Magnet services
Mozilla Public License 2.0
1 stars 1 forks source link

Clarify channel_name or channel_id #22

Closed wilsonpage closed 7 years ago

wilsonpage commented 7 years ago

I've noticed we have the concept of a channel_name and channel_id. The 'get-all-channels' route returns both, but the 'search-for-beacons-here' route returns only channel_name. IMO we should move to an ID that never changes and inflate/join this model when required.

@samgiles what you recon?

samgiles commented 7 years ago

Yeh, I've made a PR to start to make this consistent. #24

samgiles commented 7 years ago

This will consistently be channel as an indentifier.

wilsonpage commented 7 years ago

@samgiles could you patch magnet-client so we can land simultaneously?

samgiles commented 7 years ago

It'll be backwards compatible for older clients. Will open a PR though once this has been deployed.

samgiles commented 7 years ago

channel_id everywhere. The convention is to be: A resource has an id field, and if it refers to another resource, it does so with a <thing>_id field.

Really these relationships should be hyperlinks... but, for simplicity's sake, we'll stick with this for now.