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

41 lines
1.1 KiB
Plaintext

import { jobsCollectionSlug } from '../queues/config/collection.js';
export const defaultUpdateJobs = async function updateMany({ id, data, limit, req, returning, where }) {
const updatedJobs = [];
const jobsToUpdate = (id ? [
await this.findOne({
collection: jobsCollectionSlug,
req,
where: {
id: {
equals: id
}
}
})
] : (await this.find({
collection: jobsCollectionSlug,
limit,
pagination: false,
req,
where
})).docs).filter(Boolean);
if (!jobsToUpdate) {
return null;
}
for (const job of jobsToUpdate){
const updateData = {
...job,
...data
};
const updatedJob = await this.updateOne({
id: job.id,
collection: jobsCollectionSlug,
data: updateData,
req,
returning
});
updatedJobs.push(updatedJob);
}
return updatedJobs;
};
//# sourceMappingURL=defaultUpdateJobs.js.map