lint
This commit is contained in:
@@ -65,7 +65,7 @@ export default function Page() {
|
|||||||
ossStore.setStore(store);
|
ossStore.setStore(store);
|
||||||
ossStore.setWorkDir(`tone-page/${data.userId}`)
|
ossStore.setWorkDir(`tone-page/${data.userId}`)
|
||||||
ossStore.loadObjectList();
|
ossStore.loadObjectList();
|
||||||
}, [storeMeta.stsTokenData]);
|
}, [storeMeta, storeMeta.stsTokenData]);
|
||||||
|
|
||||||
const handleRefreshFileList = async () => ossStore.loadObjectList().catch(e => toast.error(e.message));
|
const handleRefreshFileList = async () => ossStore.loadObjectList().catch(e => toast.error(e.message));
|
||||||
const handleCheckboxChange = ossStore.handleObjectCheckedStateChanged.bind(ossStore);
|
const handleCheckboxChange = ossStore.handleObjectCheckedStateChanged.bind(ossStore);
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { useOssStore } from "@/hooks/admin/web/blog/use-oss-store";
|
|
||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
import { StsToken } from "../api/oss";
|
|
||||||
import OSS from "ali-oss";
|
import OSS from "ali-oss";
|
||||||
|
|
||||||
export interface OssObjectItem {
|
export interface OssObjectItem {
|
||||||
@@ -86,7 +84,7 @@ export class OssStore {
|
|||||||
|
|
||||||
let failedCount = 0;
|
let failedCount = 0;
|
||||||
for (const objectItem of objectItems) {
|
for (const objectItem of objectItems) {
|
||||||
await this.deleteObject(objectItem).catch(e => failedCount++);
|
await this.deleteObject(objectItem).catch(() => failedCount++);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { all: objectItems.length, failed: failedCount };
|
return { all: objectItems.length, failed: failedCount };
|
||||||
|
|||||||
Reference in New Issue
Block a user