mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-05 15:37:21 +08:00
🐛 Fix(custom): fix delete event error in server api
This commit is contained in:
@@ -151,7 +151,8 @@ export const deleteChoosedFiles = async (list: ImgInfo[]): Promise<boolean[]> =>
|
|||||||
if (item.id) {
|
if (item.id) {
|
||||||
try {
|
try {
|
||||||
const dbStore = GalleryDB.getInstance()
|
const dbStore = GalleryDB.getInstance()
|
||||||
const file = await dbStore.removeById(item.id)
|
const file = await dbStore.getById(item.id)
|
||||||
|
await dbStore.removeById(item.id)
|
||||||
if (await picgo.getConfig('settings.deleteCloudFile')) {
|
if (await picgo.getConfig('settings.deleteCloudFile')) {
|
||||||
if (item.type !== undefined && picBedsCanbeDeleted.includes(item.type)) {
|
if (item.type !== undefined && picBedsCanbeDeleted.includes(item.type)) {
|
||||||
const noteFunc = (value: boolean) => {
|
const noteFunc = (value: boolean) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user