Unable to delete passkey
When I try to delete a passkey I get this error
Error [PrismaClientValidationError]:
Invalid `db[model].delete()` invocation in
/home/shahriyar/Development/next/next-btrauth-trpc/.next/dev/server/chunks/node_modules_better-auth_dist_4af37306._.js:5266:47
5263 if (!db[model]) throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$better$2d$auth$2f$core$2f$dist$2f$error$2d$BhAKg8LX$2e$mjs__$5b$app$2d$route$5d$__$28$ecmascript$29$__$3c$export__t__as__BetterAuthError$3e$__["BetterAuthError"](`Model ${model} does not exist in the database. If you haven't generated the Prisma client, you need to run 'npx prisma generate'`);
5264 const whereClause = convertWhereClause(model, where);
5265 try {
→ 5266 await db[model].delete({
where: {
AND: [
{
id: "PpeqpOyKLw4Jy8tq23og7PPn0kElX12v"
},
{
userId: "5HZ9zVRijxFpz6glZeLJJahYFs8MDbcc"
}
],
? id?: String,
? OR?: PasskeyWhereInput[],
? NOT?: PasskeyWhereInput | PasskeyWhereInput[],
? name?: StringNullableFilter | String | Null,
? publicKey?: StringFilter | String,
? userId?: StringFilter | String,
? credentialID?: StringFilter | String,
? counter?: IntFilter | Int,
? deviceType?: StringFilter | String,
? backedUp?: BoolFilter | Boolean,
? transports?: StringNullableFilter | String | Null,
? createdAt?: DateTimeNullableFilter | DateTime | Null,
? aaguid?: StringNullableFilter | String | Null,
? user?: UserScalarRelationFilter | UserWhereInput
}
})
Argument `where` of type PasskeyWhereUniqueInput needs at least one of `id` arguments. Available options are marked with ?.
at ignore-listed frames {
clientVersion: '7.0.1'
}Error [PrismaClientValidationError]:
Invalid `db[model].delete()` invocation in
/home/shahriyar/Development/next/next-btrauth-trpc/.next/dev/server/chunks/node_modules_better-auth_dist_4af37306._.js:5266:47
5263 if (!db[model]) throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$better$2d$auth$2f$core$2f$dist$2f$error$2d$BhAKg8LX$2e$mjs__$5b$app$2d$route$5d$__$28$ecmascript$29$__$3c$export__t__as__BetterAuthError$3e$__["BetterAuthError"](`Model ${model} does not exist in the database. If you haven't generated the Prisma client, you need to run 'npx prisma generate'`);
5264 const whereClause = convertWhereClause(model, where);
5265 try {
→ 5266 await db[model].delete({
where: {
AND: [
{
id: "PpeqpOyKLw4Jy8tq23og7PPn0kElX12v"
},
{
userId: "5HZ9zVRijxFpz6glZeLJJahYFs8MDbcc"
}
],
? id?: String,
? OR?: PasskeyWhereInput[],
? NOT?: PasskeyWhereInput | PasskeyWhereInput[],
? name?: StringNullableFilter | String | Null,
? publicKey?: StringFilter | String,
? userId?: StringFilter | String,
? credentialID?: StringFilter | String,
? counter?: IntFilter | Int,
? deviceType?: StringFilter | String,
? backedUp?: BoolFilter | Boolean,
? transports?: StringNullableFilter | String | Null,
? createdAt?: DateTimeNullableFilter | DateTime | Null,
? aaguid?: StringNullableFilter | String | Null,
? user?: UserScalarRelationFilter | UserWhereInput
}
})
Argument `where` of type PasskeyWhereUniqueInput needs at least one of `id` arguments. Available options are marked with ?.
at ignore-listed frames {
clientVersion: '7.0.1'
}