mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
16 lines
508 B
TypeScript
16 lines
508 B
TypeScript
import type { IStringKeyMap } from '#/types/types'
|
|
import { getRawData } from '~/utils/common'
|
|
import { removeFileFromDogeInMain } from '~/utils/deleteFunc'
|
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
|
|
|
export default class AwsS3Api {
|
|
static async delete (configMap: IStringKeyMap): Promise<boolean> {
|
|
try {
|
|
return await removeFileFromDogeInMain(getRawData(configMap))
|
|
} catch (error: any) {
|
|
deleteFailedLog(configMap.fileName, 'DogeCloud', error)
|
|
return false
|
|
}
|
|
}
|
|
}
|