From bb7034373eb8d427932e680108c1880942e4331c Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Fri, 17 Jan 2025 19:53:07 +0100 Subject: [PATCH] fix: SQL syntax errors --- src/ports/nfts/ensQueries.ts | 2 +- src/ports/nfts/landQueries.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ports/nfts/ensQueries.ts b/src/ports/nfts/ensQueries.ts index d036709..7cf1ca7 100644 --- a/src/ports/nfts/ensQueries.ts +++ b/src/ports/nfts/ensQueries.ts @@ -40,7 +40,7 @@ export function getENSs(nftFilters: GetNFTsFilters): SQLStatement { .append(ids ? SQL` AND id = ANY(${ids}) ` : SQL``) .append( SQL` - ) + ), ` .append(getTradesCTE(nftFilters, false)) .append( diff --git a/src/ports/nfts/landQueries.ts b/src/ports/nfts/landQueries.ts index 263826e..d11b190 100644 --- a/src/ports/nfts/landQueries.ts +++ b/src/ports/nfts/landQueries.ts @@ -147,6 +147,7 @@ function getOpenTradesCTE(filters: GetNFTsFilters): SQLStatement { export function getLandsOnSaleQuery(filters: GetNFTsFilters) { return getOpenOrderNFTsCTE(filters) + .append(SQL`,`) .append(getTradesCTE(filters)) .append(getOpenTradesCTE(filters)) .append( @@ -310,6 +311,7 @@ export function getAllLANDsQuery(filters: GetNFTsFilters) { WHERE o.status = 'open' AND o.expires_normalized > NOW() )` + .append(SQL`,`) .append(getTradesCTE(filters)) .append(getOpenTradesCTE(filters)) .append(