user preferences - chord type

This commit is contained in:
2020-03-22 14:06:50 +01:00
committed by smuddy
parent 7d8f6dd80b
commit aa57dc2ce3
19 changed files with 93 additions and 21 deletions

View File

@@ -26,8 +26,8 @@ export class SongService {
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);
public async update$(songId: string, data: Partial<Song>): Promise<void> {
await this.songDataService.update$(songId, data);
}
// https://www.csvjson.com/csv2json
@@ -48,11 +48,12 @@ export class SongService {
if (mappedSongs.length === 1) {
const mappedSong = mappedSongs[0];
const id = _.id;
return await this.update(id, mappedSong);
return await this.update$(id, mappedSong);
}
});
await Promise.all(promises);
}
}