Files
klz-cables.com/.pnpm-store/v10/files/97/169520c3759d6d3bc139741ad06ea80c4a6750f4011be62ab7e009eeac7035108d99c3c89f45f2e5cdb416f084adec975b6e17673faae51760c7c291d845c1
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

29 lines
1.1 KiB
Plaintext

import { APIError } from '../../../errors/index.js';
import { deepCopyObjectSimple } from '../../../index.js';
import { createLocalReq } from '../../../utilities/createLocalReq.js';
import { updateOperation } from '../update.js';
export async function updateGlobalLocal(payload, options) {
const { slug: globalSlug, data, depth, draft, overrideAccess = true, overrideLock, populate, publishAllLocales, publishSpecificLocale, select, showHiddenFields, unpublishAllLocales } = options;
const globalConfig = payload.globals.config.find((config)=>config.slug === globalSlug);
if (!globalConfig) {
throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`);
}
return updateOperation({
slug: globalSlug,
data: deepCopyObjectSimple(data),
depth,
draft,
globalConfig,
overrideAccess,
overrideLock,
populate,
publishAllLocales,
publishSpecificLocale: publishSpecificLocale,
req: await createLocalReq(options, payload),
select,
showHiddenFields,
unpublishAllLocales
});
}
//# sourceMappingURL=update.js.map