Switch to vercel's biome setup (#543)
This commit is contained in:
parent
b8643353c0
commit
43aa1c6e58
52 changed files with 414 additions and 201 deletions
|
|
@ -20,6 +20,8 @@ import {
|
|||
// Optionally, if not using email/pass login, you can
|
||||
// use the Drizzle adapter for Auth.js / NextAuth
|
||||
// https://authjs.dev/reference/adapter/drizzle
|
||||
|
||||
// biome-ignore lint: Forbidden non-null assertion.
|
||||
const client = postgres(`${process.env.POSTGRES_URL!}?sslmode=require`);
|
||||
const db = drizzle(client);
|
||||
|
||||
|
|
@ -232,8 +234,8 @@ export async function deleteDocumentsByIdAfterTimestamp({
|
|||
.where(
|
||||
and(
|
||||
eq(suggestion.documentId, id),
|
||||
gt(suggestion.documentCreatedAt, timestamp)
|
||||
)
|
||||
gt(suggestion.documentCreatedAt, timestamp),
|
||||
),
|
||||
);
|
||||
|
||||
return await db
|
||||
|
|
@ -241,7 +243,7 @@ export async function deleteDocumentsByIdAfterTimestamp({
|
|||
.where(and(eq(document.id, id), gt(document.createdAt, timestamp)));
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Failed to delete documents by id after timestamp from database'
|
||||
'Failed to delete documents by id after timestamp from database',
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
|
|
@ -272,7 +274,7 @@ export async function getSuggestionsByDocumentId({
|
|||
.where(and(eq(suggestion.documentId, documentId)));
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Failed to get suggestions by document version from database'
|
||||
'Failed to get suggestions by document version from database',
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue