From 0cf116c5ad659cefc03f88b2e6e9b6f839ba0a71 Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 26 Oct 2022 18:02:27 +0300 Subject: comments table creation fix; error code fix --- src/database/postgres.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/database') diff --git a/src/database/postgres.ts b/src/database/postgres.ts index 9ea65dc..8c87e00 100644 --- a/src/database/postgres.ts +++ b/src/database/postgres.ts @@ -67,7 +67,7 @@ create table ${name}.comment( content text NOT NULL, image text, imagetype text, - constraints fk_tid + constraint fk_tid foreign key(tid) references ${name}.thread(id) );`; @@ -158,7 +158,7 @@ insert into ${board}.comment ( );`; client.query(query, (err, res) => { - let r: { status: number, data: any } = { status: 404, data: undefined }; + let r: { status: number, data: any } = { status: 500, data: undefined }; if (err) { r.data = err.message; } else { -- cgit v1.2.3