Fixed bug that prevented categorized files from being deletes and simplified the two delete file API calls into one

This commit is contained in:
Isaac Abadi
2020-10-18 02:20:06 -04:00
parent deac54e8d6
commit 0189d292a8
5 changed files with 15 additions and 61 deletions

View File

@@ -56,7 +56,7 @@ export class FileCardComponent implements OnInit {
deleteFile(blacklistMode = false) {
if (!this.playlist) {
this.postsService.deleteFile(this.uid, this.isAudio, blacklistMode).subscribe(result => {
this.postsService.deleteFile(this.uid, this.isAudio ? 'audio' : 'video', blacklistMode).subscribe(result => {
if (result) {
this.openSnackBar('Delete success!', 'OK.');
this.removeFile.emit(this.name);