Skip to content

Commit bc3f079

Browse files
committed
Modified the type annotation for page, size and countOfTxns
Signed-off-by: ArchanaArige <[email protected]>
1 parent dec23e9 commit bc3f079

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/persistence/fabric/CRUDService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ export class CRUDService {
9696
from: any,
9797
to: any,
9898
orgs: string,
99-
page: any,
100-
size: any
99+
page: number,
100+
size: number
101101
) {
102-
var countOfTxns: any;
102+
var countOfTxns: number;
103103
let sqlTxList = ` select t.creator_msp_id,t.txhash,t.type,t.chaincodename,t.createdt,channel.name as channelName from transactions as t
104104
inner join channel on t.channel_genesis_hash=channel.channel_genesis_hash and t.network_name = channel.network_name where t.blockid >= $1 and t.id >= $2 and
105105
t.channel_genesis_hash = $3 and t.network_name = $4 and t.createdt between $5 and $6 `;

app/persistence/postgreSQL/PgService.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ export class PgService {
571571
* @returns
572572
* @memberof PgService
573573
*/
574-
getRowsCountBySQlQuery(sql, values) {
574+
getRowsCountBySQlQuery(sql, values): Promise<number> {
575575
return new Promise((resolve, reject) => {
576576
this.client.query(sql, values, (err, res) => {
577577
if (err) {
@@ -581,8 +581,6 @@ export class PgService {
581581
logger.debug(`the getRowsCountBySQlQuery ${res}`);
582582
if (res) {
583583
resolve(res.rows[0].count);
584-
} else {
585-
resolve(null);
586584
}
587585
});
588586
});

0 commit comments

Comments
 (0)