Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Listen to each track changes + trackUniques model #36

Open
4www opened this issue Feb 22, 2018 · 0 comments
Open

Listen to each track changes + trackUniques model #36

4www opened this issue Feb 22, 2018 · 0 comments

Comments

@4www
Copy link

4www commented Feb 22, 2018

Create a function that will listen to each changes at the API endpoint /tracks/$track.

  • check if this $track.yid exists at the new model trackUniques.[$track.yid]

  • if exists: create a new relation (question: reference the $track.id or $track.channel? — see note1)

  • if not: create the new trackUniques model and its first relation

  • play the role of a backend and parse the $track.body for each #hashtag, and save them in new relationship $track.tags: hasMany('tag') —> we'll then have to create the /tags API endpoint

  • could also check if there is a @mention (or +@mention that could mean "send this track to my friend") and if $track.channel is in @mention.favorites would add this info somewhere (to be determined and though uppon — let's please not spam)

Note1:
OR trackUniques.[$track.yid].channels.[$track.channel] = true
OR trackUniques.[$track.yid].trackOccurences.[$track.id] = true
OR both

@4www 4www changed the title Listen to each track changes Listen to each track changes + trackUniques model Feb 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant