return schemas from backend

This commit is contained in:
Martin McKeaveney 2021-01-26 16:02:44 +00:00
parent aa28bb5e94
commit 9581e50e45
1 changed files with 3 additions and 3 deletions

View File

@ -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 }]
}
}