This commit is contained in:
2020-03-07 23:00:11 +01:00
committed by smuddy
parent ccd91aa81c
commit d68cd590ad
57 changed files with 2012 additions and 3489 deletions

View File

@@ -1,6 +1,6 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import {Song} from '../models/song';
import {Song} from './song';
import {SongDataService} from './song-data.service';
import {tap} from 'rxjs/operators';
@@ -26,8 +26,8 @@ export class SongService {
importCCLI = (songs: Song[]) => this.updateFromCLI(songs);
}
public list$ = (): Observable<Song[]> => this.songDataService.list().pipe(tap(_ => this.list = _));
public read = (songId: string): Observable<Song | undefined> => this.songDataService.read(songId);
public list$ = (): Observable<Song[]> => this.songDataService.list$().pipe(tap(_ => this.list = _));
public read = (songId: string): Observable<Song | undefined> => this.songDataService.read$(songId);
public async update(songId: string, data: any): Promise<void> {
await this.songDataService.update(songId, data);