Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fabric-sdk-node to v2.2.6 #246

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions app/rest/dbroutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function dbroutes(router: Router, platform: Platform) {
router.get('/status/:channel_genesis_hash', (req, res) => {
const channel_genesis_hash = req.params.channel_genesis_hash;
if (channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbStatusMetrics.getStatus(extReq.network, channel_genesis_hash, data => {
if (data && data.chaincodeCount && data.txCount && data.peerCount) {
return res.send(data);
Expand Down Expand Up @@ -52,7 +52,7 @@ export function dbroutes(router: Router, platform: Platform) {
const number = parseInt(req.params.number);
const channel_genesis_hash = req.params.channel_genesis_hash;
if (!isNaN(number) && channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
const row = await dbCrudService.getTxCountByBlockNum(
extReq.network,
channel_genesis_hash,
Expand Down Expand Up @@ -88,7 +88,7 @@ export function dbroutes(router: Router, platform: Platform) {
const txid = req.params.txid;
const channel_genesis_hash = req.params.channel_genesis_hash;
if (txid && txid !== '0' && channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbCrudService
.getTransactionByID(extReq.network, channel_genesis_hash, txid)
.then((row: { createdt: string | number | Date }) => {
Expand All @@ -105,7 +105,7 @@ export function dbroutes(router: Router, platform: Platform) {
router.get('/blockActivity/:channel_genesis_hash', (req, res) => {
const channel_genesis_hash = req.params.channel_genesis_hash;
if (channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbCrudService
.getBlockActivityList(extReq.network, channel_genesis_hash)
.then((row: any) => {
Expand Down Expand Up @@ -143,7 +143,7 @@ export function dbroutes(router: Router, platform: Platform) {
txid = 0;
}
if (channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbCrudService
.getTxList(
extReq.network,
Expand Down Expand Up @@ -179,7 +179,7 @@ export function dbroutes(router: Router, platform: Platform) {
router.get('/chaincode/:channel', (req, res) => {
const channelName = req.params.channel;
if (channelName) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbStatusMetrics.getTxPerChaincode(
extReq.network,
channelName,
Expand Down Expand Up @@ -210,7 +210,7 @@ export function dbroutes(router: Router, platform: Platform) {
router.get('/peers/:channel_genesis_hash', (req, res) => {
const channel_genesis_hash = req.params.channel_genesis_hash;
if (channel_genesis_hash) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
dbStatusMetrics.getPeerList(
extReq.network,
channel_genesis_hash,
Expand Down Expand Up @@ -244,7 +244,7 @@ export function dbroutes(router: Router, platform: Platform) {
req.query.to as string
);
if (channel_genesis_hash && !isNaN(blockNum)) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
return dbCrudService
.getBlockAndTxList(
extReq.network,
Expand Down Expand Up @@ -276,7 +276,7 @@ export function dbroutes(router: Router, platform: Platform) {
const hours = parseInt(req.params.hours);

if (channel_genesis_hash && !isNaN(hours)) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
return dbStatusMetrics
.getTxByMinute(extReq.network, channel_genesis_hash, hours)
.then(handleResult(req, res));
Expand All @@ -298,7 +298,7 @@ export function dbroutes(router: Router, platform: Platform) {
const days = parseInt(req.params.days);

if (channel_genesis_hash && !isNaN(days)) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
return dbStatusMetrics
.getTxByHour(extReq.network, channel_genesis_hash, days)
.then(handleResult(req, res));
Expand All @@ -319,7 +319,7 @@ export function dbroutes(router: Router, platform: Platform) {
const hours = parseInt(req.params.hours);

if (channel_genesis_hash && !isNaN(hours)) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
return dbStatusMetrics
.getBlocksByMinute(extReq.network, channel_genesis_hash, hours)
.then(handleResult(req, res));
Expand Down Expand Up @@ -349,7 +349,7 @@ export function dbroutes(router: Router, platform: Platform) {
const days = parseInt(req.params.days);

if (channel_genesis_hash && !isNaN(days)) {
const extReq = req as ExtRequest;
const extReq = (req as unknown) as ExtRequest;
return dbStatusMetrics
.getBlocksByHour(extReq.network, channel_genesis_hash, days)
.then(handleResult(req, res));
Expand Down
Loading