update tslint -> eslint
This commit is contained in:
@@ -4,22 +4,17 @@ import {Observable} from 'rxjs';
|
||||
import {FileDataService} from './file-data.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class FileService {
|
||||
|
||||
constructor(
|
||||
private storage: AngularFireStorage,
|
||||
private fileDataService: FileDataService
|
||||
) {
|
||||
}
|
||||
public constructor(private storage: AngularFireStorage, private fileDataService: FileDataService) {}
|
||||
|
||||
public getDownloadUrl(path: string): Observable<string> {
|
||||
const ref = this.storage.ref(path);
|
||||
return ref.getDownloadURL();
|
||||
return ref.getDownloadURL() as Observable<string>;
|
||||
}
|
||||
|
||||
public async delete(path: string, songId: string, fileId: string) {
|
||||
public async delete(path: string, songId: string, fileId: string): Promise<void> {
|
||||
const ref = this.storage.ref(path);
|
||||
await ref.delete().toPromise();
|
||||
await this.fileDataService.delete(songId, fileId);
|
||||
|
||||
Reference in New Issue
Block a user