This commit is contained in:
Baobhan Sith
2025-05-08 16:43:02 +08:00
parent 7513e98cdf
commit 787114bb4c
7 changed files with 74 additions and 7 deletions
@@ -142,6 +142,13 @@ export class PasskeyRepository {
const { changes } = await runDb(db, sql, [name, credentialId]);
return changes > 0;
}
async getFirstPasskey(): Promise<Passkey | null> {
const db = await getDbInstance();
const sql = 'SELECT * FROM passkeys LIMIT 1';
const result = await getDb<any>(db, sql);
return mapPasskeyResult(result);
}
}
export const passkeyRepository = new PasskeyRepository();