Files
klz-cables.com/.pnpm-store/v10/files/e6/04e8d662e749bd6bb20868c8e2d2db2fef6a8537a750754deb5f08f9fd4ce20b91bdb162b2876de46a181e0c158a1dae12c91ee7f0fefb06319220e42797e3
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

30 lines
1.0 KiB
Plaintext

import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { unlockOperation } from '../operations/unlock.js';
export const unlockHandler = async (req)=>{
const collection = getRequestCollection(req);
const { t } = req;
const authData = collection.config.auth?.loginWithUsername !== false ? {
email: typeof req.data?.email === 'string' ? req.data.email : '',
username: typeof req.data?.username === 'string' ? req.data.username : ''
} : {
email: typeof req.data?.email === 'string' ? req.data.email : ''
};
await unlockOperation({
collection,
data: authData,
req
});
return Response.json({
message: t('general:success')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=unlock.js.map