Files
klz-cables.com/.pnpm-store/v10/files/11/839083f01f24b33b2cc6b1e347f59b49a3ac9d7ba6c0a030de8838eae1c6e6a3c2d62bf0d62826ba412aa7d17e649dbc3cc718c7a290e296c9d21e0318b352
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

1 line
2.1 KiB
Plaintext

{"version":3,"sources":["../../../src/auth/baseFields/verification.ts"],"sourcesContent":["import type { Field, FieldHook } from '../../fields/config/types.js'\n\nconst autoRemoveVerificationToken: FieldHook = ({ data, operation, originalDoc, value }) => {\n // If a user manually sets `_verified` to true,\n // and it was `false`, set _verificationToken to `null`.\n // This is useful because the admin panel\n // allows users to set `_verified` to true manually\n\n if (operation === 'update') {\n if (data?._verified === true && originalDoc?._verified === false) {\n return null\n }\n }\n\n return value\n}\n\nexport const verificationFields: Field[] = [\n {\n name: '_verified',\n type: 'checkbox',\n access: {\n create: ({ req: { user } }) => Boolean(user),\n read: ({ req: { user } }) => Boolean(user),\n update: ({ req: { user } }) => Boolean(user),\n },\n admin: {\n components: {\n Field: false,\n },\n },\n label: ({ t }) => t('authentication:verified'),\n },\n {\n name: '_verificationToken',\n type: 'text',\n hidden: true,\n hooks: {\n beforeChange: [autoRemoveVerificationToken],\n },\n },\n] as Field[]\n"],"names":["autoRemoveVerificationToken","data","operation","originalDoc","value","_verified","verificationFields","name","type","access","create","req","user","Boolean","read","update","admin","components","Field","label","t","hidden","hooks","beforeChange"],"mappings":"AAEA,MAAMA,8BAAyC,CAAC,EAAEC,IAAI,EAAEC,SAAS,EAAEC,WAAW,EAAEC,KAAK,EAAE;IACrF,+CAA+C;IAC/C,wDAAwD;IACxD,yCAAyC;IACzC,mDAAmD;IAEnD,IAAIF,cAAc,UAAU;QAC1B,IAAID,MAAMI,cAAc,QAAQF,aAAaE,cAAc,OAAO;YAChE,OAAO;QACT;IACF;IAEA,OAAOD;AACT;AAEA,OAAO,MAAME,qBAA8B;IACzC;QACEC,MAAM;QACNC,MAAM;QACNC,QAAQ;YACNC,QAAQ,CAAC,EAAEC,KAAK,EAAEC,IAAI,EAAE,EAAE,GAAKC,QAAQD;YACvCE,MAAM,CAAC,EAAEH,KAAK,EAAEC,IAAI,EAAE,EAAE,GAAKC,QAAQD;YACrCG,QAAQ,CAAC,EAAEJ,KAAK,EAAEC,IAAI,EAAE,EAAE,GAAKC,QAAQD;QACzC;QACAI,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;QACF;QACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEb,MAAM;QACNC,MAAM;QACNa,QAAQ;QACRC,OAAO;YACLC,cAAc;gBAACvB;aAA4B;QAC7C;IACF;CACD,CAAW"}