Files
klz-cables.com/.pnpm-store/v10/files/3f/8c8b6b4707d8700217ebdfe1103593336b8c8d5d1656ef845673246bd1cbb2715434c8f27f21d9e12bda4e6cc8f81ef77bc02d5d15184f9783db61329c1fd2
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
1.4 KiB
Plaintext

{"version":3,"sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"sourcesContent":["import type { SanitizedCollectionConfig, TypeWithID } from '../../../collections/config/types.js'\nimport type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\ntype Args = {\n collection: SanitizedCollectionConfig\n doc: Record<string, unknown> & TypeWithID\n payload: Payload\n req: PayloadRequest\n}\n\nexport const resetLoginAttempts = async ({\n collection,\n doc,\n payload,\n req,\n}: Args): Promise<void> => {\n if (\n !('lockUntil' in doc && typeof doc.lockUntil === 'string') &&\n (!('loginAttempts' in doc) || doc.loginAttempts === 0)\n ) {\n return\n }\n await payload.db.updateOne({\n id: doc.id,\n collection: collection.slug,\n data: {\n lockUntil: null,\n loginAttempts: 0,\n },\n req,\n returning: false,\n })\n}\n"],"names":["resetLoginAttempts","collection","doc","payload","req","lockUntil","loginAttempts","db","updateOne","id","slug","data","returning"],"mappings":"AAWA,OAAO,MAAMA,qBAAqB,OAAO,EACvCC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,GAAG,EACE;IACL,IACE,CAAE,CAAA,eAAeF,OAAO,OAAOA,IAAIG,SAAS,KAAK,QAAO,KACvD,CAAA,CAAE,CAAA,mBAAmBH,GAAE,KAAMA,IAAII,aAAa,KAAK,CAAA,GACpD;QACA;IACF;IACA,MAAMH,QAAQI,EAAE,CAACC,SAAS,CAAC;QACzBC,IAAIP,IAAIO,EAAE;QACVR,YAAYA,WAAWS,IAAI;QAC3BC,MAAM;YACJN,WAAW;YACXC,eAAe;QACjB;QACAF;QACAQ,WAAW;IACb;AACF,EAAC"}