Files
klz-cables.com/.pnpm-store/v10/files/ab/d74b57d22e46cf88d8838eb6272844bea90c25ce90dcc7ca74f6ab38006aca8ade818647f212be3dee4b95dfa09758ef5a54e94df4094814094f0bf2c4d3d5
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.6 KiB
Plaintext

{"version":3,"file":"relations.cjs","names":[],"sources":["../../../../src/rest/commands/update/relations.ts"],"sourcesContent":["import type { DirectusRelation } from '../../../schema/relation.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type UpdateRelationOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusRelation<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Update an existing relation.\n * @param collection\n * @param field\n * @param item\n * @param query\n * @returns Returns the relation object for the created relation.\n */\nexport const updateRelation =\n\t<Schema, const TQuery extends Query<Schema, DirectusRelation<Schema>>>(\n\t\tcollection: DirectusRelation<Schema>['collection'],\n\t\tfield: DirectusRelation<Schema>['field'],\n\t\titem: NestedPartial<DirectusRelation<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateRelationOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(collection, 'Collection cannot be empty');\n\t\tthrowIfEmpty(field, 'Field cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/relations/${collection}/${field}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n"],"mappings":"kDAmBa,GAEX,EACA,EACA,EACA,SAGA,EAAA,aAAa,EAAY,6BAA6B,CACtD,EAAA,aAAa,EAAO,wBAAwB,CAErC,CACN,KAAM,cAAc,EAAW,GAAG,IAClC,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,QACR"}