Files
klz-cables.com/.pnpm-store/v10/files/0b/4a726858fe9594456a92309c94b126d7544b7f4a35bd97d43c0bcdc69459fac45d9b8050745edf260c4855c1f239fa909c19ac3eefb77c77e9f2647e86753d
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

32 lines
1.2 KiB
Plaintext

import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { forgotPasswordOperation } from '../operations/forgotPassword.js';
export const forgotPasswordHandler = async (req)=>{
const { t } = req;
const collection = getRequestCollection(req);
const authData = collection.config.auth?.loginWithUsername ? {
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 forgotPasswordOperation({
collection,
data: authData,
disableEmail: Boolean(req.data?.disableEmail),
expiration: typeof req.data?.expiration === 'number' ? req.data.expiration : undefined,
req
});
return Response.json({
message: t('general:success')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=forgotPassword.js.map