linted files

pull/11/head
Isaac Grynsztein 6 years ago
parent abaa799628
commit 10c90a01f2

@ -11,11 +11,11 @@ import {EventEmitter} from '@angular/core';
}) })
export class FileCardComponent implements OnInit { export class FileCardComponent implements OnInit {
@Input() title:string; @Input() title: string;
@Input() length:string; @Input() length: string;
@Input() name:string; @Input() name: string;
@Input() thumbnailURL: string; @Input() thumbnailURL: string;
@Input() isAudio: boolean = true; @Input() isAudio = true;
@Output() removeFile: EventEmitter<string> = new EventEmitter<string>(); @Output() removeFile: EventEmitter<string> = new EventEmitter<string>();
constructor(private postsService: PostsService, public snackBar: MatSnackBar, public appComponent: AppComponent) { } constructor(private postsService: PostsService, public snackBar: MatSnackBar, public appComponent: AppComponent) { }
@ -23,17 +23,13 @@ export class FileCardComponent implements OnInit {
ngOnInit() { ngOnInit() {
} }
deleteFile() deleteFile() {
{
this.postsService.deleteFile(this.name, this.isAudio).subscribe(result => { this.postsService.deleteFile(this.name, this.isAudio).subscribe(result => {
if (result == true) if (result === true) {
{ this.openSnackBar('Delete success!', 'OK.');
this.openSnackBar("Delete success!", "OK.");
this.removeFile.emit(this.name); this.removeFile.emit(this.name);
} } else {
else this.openSnackBar('Delete failed!', 'OK.');
{
this.openSnackBar("Delete failed!", "OK.");
} }
}); });
} }

Loading…
Cancel
Save