站点同步
This commit is contained in:
1 parent
a64be50b73
commit
9cb8552a99
28 files changed
+1683
-18
No files matched your search
@@ -3,7 +3,7 @@ import { assertImageOwnership, requireApiOrAdminAuth } from '../../utils/access'
|
||||
import { createApiError } from '../../utils/api-error'
|
||||
import { logActivity } from '../../utils/activity-log'
|
||||
import { deleteImageIndex, getImageIndexRow } from '../../utils/image-index'
|
||||
import { validateFileKey, validateVideoKey } from '../../utils/image-key'
|
||||
import { validateStorageKey, validateVideoKey } from '../../utils/image-key'
|
||||
import { deleteImage, headImage } from '../../utils/storage'
|
||||
import { cancelTranscode, removeHlsArtifacts } from '../../utils/transcode'
|
||||
import { MAX_DELETE_BATCH } from '../../utils/constants'
|
||||
@@ -31,7 +31,7 @@ export default defineEventHandler(async (event) => {
|
||||
const failed: BatchDeleteResponse['failed'] = []
|
||||
|
||||
for (const key of keys) {
|
||||
if (!validateFileKey(key) && !validateVideoKey(key)) {
|
||||
if (!validateStorageKey(key)) {
|
||||
failed.push({ key, error: { code: 'INVALID_IMAGE_KEY', message: '无效的文件路径' } })
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user