public async Task <bool> DeleteFile(string fileId) { var file = await GetFile(fileId); if (file != null) { fileWriter.Delete(file.Path); database.FileRepository.Delete(file); return(await database.Complete()); } Alertify.Push("File cannot be found", AlertType.Error); return(false); }