ismx-nexo-node-app 0.4.107 → 0.4.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -228,8 +228,8 @@ class RepositoryDatabasePostgres extends RepositoryDatabase_1.default {
228
228
  let schema = this.tables[tableName][0].schema;
229
229
  let { where, values } = this.toWhere(tableName, filters);
230
230
  let query = `
231
- SELECT json_object_agg(u.${select}, NULL) as list
232
- FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE "user" = ${where} ) t`;
231
+ SELECT json_object_agg(t.${select}, NULL) as list
232
+ FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE ${where} ) t`;
233
233
  return this.query(query, values).then((result) => { var _a, _b; return new Repository_1.Hash((_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.list) !== null && _b !== void 0 ? _b : {}); });
234
234
  });
235
235
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.107",
3
+ "version": "0.4.109",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -199,8 +199,8 @@ export default class RepositoryDatabasePostgres extends RepositoryDatabase
199
199
  let schema = this.tables[tableName][0].schema;
200
200
  let { where, values } = this.toWhere(tableName, filters as any);
201
201
  let query = `
202
- SELECT json_object_agg(u.${select}, NULL) as list
203
- FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE "user" = ${where} ) t`;
202
+ SELECT json_object_agg(t.${select}, NULL) as list
203
+ FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE ${where} ) t`;
204
204
  return this.query<{list:Record<Primitive, null>}>(query, values).then((result) => new Hash(result[0]?.list ?? {}));
205
205
  }
206
206