How to use the entities.HistorySong.fromSong function in entities

To help you get started, we’ve selected a few entities examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mgm-interns / team-radio / server / src / services / crud / song / HistorySongCRUDService.ts View on Github external
public async delete(id: string): Promise {
    const song = await super.delete(id);
    return HistorySong.fromSong(song);
  }
github mgm-interns / team-radio / server / src / services / crud / song / HistorySongCRUDService.ts View on Github external
downVotes?: string[]
  ): Promise {
    const song = await super.update(
      id,
      songId,
      title,
      url,
      creatorId,
      stationId,
      duration,
      thumbnail,
      isPlayed,
      upVotes,
      downVotes
    );
    return HistorySong.fromSong(song);
  }
github mgm-interns / team-radio / server / src / services / crud / song / HistorySongCRUDService.ts View on Github external
public async findOne(id?: string): Promise {
    const song = await super.findOne(id);
    return HistorySong.fromSong(song);
  }