From 1ec2181c2c77ccb6cc938881b2d2d350b7af87e2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 7 Oct 2022 23:29:34 -0500 Subject: [PATCH] OMG slurp --- db/mod.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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],