fix: Issues #231 done.

This commit is contained in:
chiayin
2024-03-01 16:53:30 +08:00
parent 20bfa0b2ef
commit 68cf73f4e5
2 changed files with 15 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ import axios from "axios";
import moment from 'moment';
import apiError from '@/module/apiError.js';
import Swal from 'sweetalert2';
import { uploadFailedFirst, uploadFailedSecond, uploadloader, uploadSuccess } from '@/module/alertModal.js';
import { uploadFailedFirst, uploadFailedSecond, uploadloader, uploadSuccess, deleteSuccess } from '@/module/alertModal.js';
import pinia from '@/stores/main.js';
import loadingStore from '@/stores/loading.js';
@@ -280,6 +280,7 @@ export default defineStore('filesStore', {
try {
const response = await axios.delete(api);
await this.fetchAllFiles();
await deleteSuccess();
} catch(error) {
apiError(error, 'Failed to delete.');
} finally {