diff --git a/services/loopback/common/methods/client/getTransactions.js b/services/loopback/common/methods/client/getTransactions.js index 764e0df7d..b86421a95 100644 --- a/services/loopback/common/methods/client/getTransactions.js +++ b/services/loopback/common/methods/client/getTransactions.js @@ -22,6 +22,7 @@ module.exports = Self => { }); Self.getTransactions = async filter => { + let conn = Self.dataSource.connector; let stmt = new ParameterizedSQL(` SELECT t.id, @@ -36,7 +37,7 @@ module.exports = Self => { LEFT JOIN hedera.tpvResponse tt ON tt.id = t.response LEFT JOIN hedera.tpvError te ON te.code = errorCode`); - stmt.merge(Self.buildSuffix(filter, 't')); + stmt.merge(conn.makeSuffix(filter, 't')); return await Self.rawStmt(stmt); }; diff --git a/services/ticket/common/methods/expedition/filter.js b/services/ticket/common/methods/expedition/filter.js index a51006ffd..ef5164c50 100644 --- a/services/ticket/common/methods/expedition/filter.js +++ b/services/ticket/common/methods/expedition/filter.js @@ -1,6 +1,6 @@ const ParameterizedSQL = require('vn-loopback/node_modules/loopback-connector').ParameterizedSQL; -module.exports = (Self) => { +module.exports = Self => { Self.remoteMethod('filter', { description: 'Find all instances of the model matched by filter from the data source.', accessType: 'READ', @@ -22,7 +22,7 @@ module.exports = (Self) => { }, }); - Self.filter = async (filter) => { + Self.filter = async filter => { const stmt = new ParameterizedSQL( `SELECT e.id,