diff --git a/db/mod.ts b/db/mod.ts index 21ea497..624816f 100644 --- a/db/mod.ts +++ b/db/mod.ts @@ -18,7 +18,7 @@ const pool = new Pool(config.postgres.url, 3, true); export async function queryObject( sql: string, - ...args: QueryArguments[] + args: QueryArguments[], ): Promise | null> { let result = null; try { @@ -42,7 +42,7 @@ export async function queryObject( export async function queryArray( sql: string, - ...args: QueryArguments[] + args: QueryArguments[], ): Promise | null> { let result = null; try { @@ -71,7 +71,7 @@ export async function listNotes() { export async function getNote(id: string | { id: string }) { const idVal = typeof id == "object" ? id.id : id; - console.debug("getNote id =", idVal); + console.debug("getNote id =", JSON.stringify(idVal)); return await queryObject( "select * from note where id = $1", [idVal],