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

Listen to each track changes + trackUniques model #36

@4www

Description

@4www

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions