ff15 open top
ff15 open top
DTDrizzle Team
Created by ff15 open top on 2/20/2024 in #help
TypeError: not enough arguments
TypeError: not enough arguments
❯ new Database services/api/node_modules/libsql/index.js:67:17
❯ _createClient services/api/node_modules/@libsql/client/lib-esm/sqlite3.js:37:16
❯ _createClient services/api/node_modules/@libsql/client/lib-esm/node.js:21:16
❯ Module.createClient services/api/node_modules/@libsql/client/lib-esm/node.js:11:12
❯ services/api/db/db.ts:12:16
10| const dbAuthToken = process?.env?.VITEST_IS_TEST ? '' : Config.DB_AUTH…
11| console.log(dbUrl);
12| const client = createClient({
| ^
13| url: dbUrl,
14| authToken: dbAuthToken,
TypeError: not enough arguments
❯ new Database services/api/node_modules/libsql/index.js:67:17
❯ _createClient services/api/node_modules/@libsql/client/lib-esm/sqlite3.js:37:16
❯ _createClient services/api/node_modules/@libsql/client/lib-esm/node.js:21:16
❯ Module.createClient services/api/node_modules/@libsql/client/lib-esm/node.js:11:12
❯ services/api/db/db.ts:12:16
10| const dbAuthToken = process?.env?.VITEST_IS_TEST ? '' : Config.DB_AUTH…
11| console.log(dbUrl);
12| const client = createClient({
| ^
13| url: dbUrl,
14| authToken: dbAuthToken,
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