From 493466b4952443565bb3c4466d0d7a12c52a3cd3 Mon Sep 17 00:00:00 2001 From: Denis Carriere Date: Mon, 11 Mar 2024 22:39:47 -0400 Subject: [PATCH] add query_params to /cursor --- sql/cursor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/cursor.ts b/sql/cursor.ts index 7ddad28..8dd89a4 100644 --- a/sql/cursor.ts +++ b/sql/cursor.ts @@ -6,7 +6,7 @@ export async function findLatestCursor(req: Request) { const { module_hash, chain} = await paramsLatestCursor(req); logger.info("[sql::findLatestCursor]", { module_hash, chain }); const query = await Bun.file(import.meta.dirname + "/cursor.sql").text() - const response = await readOnlyClient.query({ query, format: "JSONEachRow" }); + const response = await readOnlyClient.query({ query, query_params: {module_hash, chain}, format: "JSONEachRow" }); const data = await response.json>(); if (data.length === 1) return data[0].latest_cursor;