mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-08 21:38:13 -05:00
🔨 Refactor(custom): optimize delete endpoint
This commit is contained in:
parent
e4c4a6f8d2
commit
8cc07dc758
@ -190,9 +190,9 @@ router.post('/delete', async ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
const aesHelper = new AESHelper()
|
||||||
const treatList = list.map(item => {
|
const treatList = list.map(item => {
|
||||||
if (!item.isEncrypted) return item
|
if (!item.isEncrypted) return item
|
||||||
const aesHelper = new AESHelper()
|
|
||||||
return JSON.parse(aesHelper.decrypt(item.EncryptedData))
|
return JSON.parse(aesHelper.decrypt(item.EncryptedData))
|
||||||
})
|
})
|
||||||
const result = await deleteChoosedFiles(treatList)
|
const result = await deleteChoosedFiles(treatList)
|
||||||
|
Loading…
Reference in New Issue
Block a user