Files
klz-cables.com/.pnpm-store/v10/files/43/cdec4e43ec10ec23ef233b832e035df1e40067fba2f6d1062ddace6dfd51d9bf65bc987d47db73e6f11d5d19af6e531578c1d2d72f08bedfe462b046f884f7
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

21 lines
832 B
Plaintext

import { APIError } from '../../../errors/index.js';
import { createLocalReq } from '../../../utilities/createLocalReq.js';
import { restoreVersionOperation } from '../restoreVersion.js';
export async function restoreGlobalVersionLocal(payload, options) {
const { id, slug: globalSlug, depth, overrideAccess = true, populate, showHiddenFields } = 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 restoreVersionOperation({
id,
depth,
globalConfig,
overrideAccess,
populate,
req: await createLocalReq(options, payload),
showHiddenFields
});
}
//# sourceMappingURL=restoreVersion.js.map