Files
klz-cables.com/.pnpm-store/v10/files/f3/f8b83e18e4b28f1d1f4e79c3f027db9ac58968067540a6c0e80ed7354894d47efbd7f23b97225821614645639ba2b9c03c1c41fce18d1023d9f045f8706ee6
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1.2 KiB
Plaintext

{"version":3,"file":"files.cjs","names":[],"sources":["../../../../src/rest/commands/delete/files.ts"],"sourcesContent":["import type { DirectusFile } from '../../../schema/file.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Delete multiple files at once.\n * @param keys\n * @returns\n * @throws Will throw if keys is empty\n */\nexport const deleteFiles =\n\t<Schema>(keys: DirectusFile<Schema>['id'][]): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(keys, 'Keys cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/files`,\n\t\t\tbody: JSON.stringify(keys),\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n\n/**\n * Delete an existing file.\n * @param key\n * @returns\n * @throws Will throw if key is empty\n */\nexport const deleteFile =\n\t<Schema>(key: DirectusFile<Schema>['id']): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(key, 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/files/${key}`,\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n"],"mappings":"kDAUa,EACH,QAER,EAAA,aAAa,EAAM,uBAAuB,CAEnC,CACN,KAAM,SACN,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,SACR,EASU,EACH,QAER,EAAA,aAAa,EAAK,sBAAsB,CAEjC,CACN,KAAM,UAAU,IAChB,OAAQ,SACR"}