fix: Issues #230 done.
This commit is contained in:
@@ -259,7 +259,6 @@ export default defineStore('filesStore', {
|
||||
let api;
|
||||
|
||||
if(id == null || isNaN(id)) {
|
||||
console.error('Delete File API:', id);
|
||||
return $toast.default('Delete File API Error.', {position: 'bottom'});
|
||||
};
|
||||
loading.isLoading = true;
|
||||
@@ -287,6 +286,22 @@ export default defineStore('filesStore', {
|
||||
loading.isLoading = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Remove a Deletion Record,真刪除被 Admin 或被其他帳號刪除的檔案
|
||||
*/
|
||||
async deletionRecord(id) {
|
||||
let api = '';
|
||||
|
||||
loading.isLoading = true;
|
||||
api = `/api/deletion/${id}`;
|
||||
try {
|
||||
const response = await axios.delete(api);
|
||||
} catch(error) {
|
||||
apiError(error, 'Failed to Remove a Deletion Record.')
|
||||
} finally {
|
||||
loading.isLoading = false;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Download file as CSV
|
||||
* @param { string } type log | filter | log-check | filter-check
|
||||
|
||||
Reference in New Issue
Block a user