From 19a3e609e6a21b6c2ded70f9d1cd381f0ad7581b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 26 Jan 2021 16:02:44 +0000 Subject: [PATCH] return schemas from backend --- packages/server/src/integrations/postgres.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/integrations/postgres.js b/packages/server/src/integrations/postgres.js index 6f3e5ed2d7..fd5b1fe96f 100644 --- a/packages/server/src/integrations/postgres.js +++ b/packages/server/src/integrations/postgres.js @@ -58,7 +58,7 @@ class PostgresIntegration { async create({ sql }) { const response = await this.client.query(sql) - return response.rows + return response.rows.length ? response.rows : [{ created: true }] } async read({ sql }) { @@ -68,12 +68,12 @@ class PostgresIntegration { async update({ sql }) { const response = await this.client.query(sql) - return response.rows + return response.rows.length ? response.rows : [{ updated: true }] } async delete({ sql }) { const response = await this.client.query(sql) - return response.rows + return response.rows.length ? response.rows : [{ deleted: true }] } }