From d4623316147306fa56e7a5317ea608dff975eb6d Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 24 Oct 2022 22:33:47 +0300 Subject: works very good --- src/database/postgres.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/database/postgres.ts b/src/database/postgres.ts index 677a106..9ea65dc 100644 --- a/src/database/postgres.ts +++ b/src/database/postgres.ts @@ -132,7 +132,7 @@ with thread_comments as ( ) as comment from ${board}.comment c ) -select t.*, COALESCE(c.comment, '[]'::jsonb) as comment +select t.*, COALESCE(c.comment, '[]'::jsonb) as comments from ${board}.thread t left join thread_comments c on (c.tid = t.id) where t.id = ${tid};`; -- cgit v1.2.3