Files
klz-cables.com/.pnpm-store/v10/files/01/71793e1b3a7f4fe283232c38fe8443d3e91c5bf7e219d2863eb59e5307e92b0533ef3a7cda40d3e4a8527057a1f9a9e9368c0f0507bbd47b75f6e1397b11cf
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

26 lines
571 B
Plaintext

import { cache } from 'react';
export const getPreferences = cache(async (key, payload, userID, userSlug) => {
const result = await payload.find({
collection: 'payload-preferences',
depth: 0,
limit: 1,
pagination: false,
where: {
and: [{
key: {
equals: key
}
}, {
'user.relationTo': {
equals: userSlug
}
}, {
'user.value': {
equals: userID
}
}]
}
}).then(res => res.docs?.[0]);
return result;
});
//# sourceMappingURL=getPreferences.js.map