ff15 open top
DTDrizzle Team
•Created by ff15 open top on 2/20/2024 in #help
TypeError: not enough arguments
Getting this error in seed.run CI/CD, does not happen locally. any ideas?
1 replies
DTDrizzle Team
•Created by ff15 open top on 12/13/2023 in #help
How do I join the same table twice?
...?
3 replies
DTDrizzle Team
•Created by ff15 open top on 12/13/2023 in #help
How can I verify a hash?
I want to run a function
export async function findUserByApiKey(apikey: string) {
return (
await db
.select()
.from(user)
.where(eq(await argon2.verify(user.apiKey, apikey), true))
)?.[0]
} else {
return null;
}
}
I want to compare the user.apiKey column with the input, but execute the verify function as an equal? is this approach correct? I can't actually run this, as user.apiKey is a drizzle column, but how would I go about running this verify function?4 replies