Skip to content

Commit

Permalink
Update fabric-sdk-node to v2.2.6
Browse files Browse the repository at this point in the history
Signed-off-by: Atsushi Neki <nekiaiken@gmail.com>
  • Loading branch information
nekia committed Jun 1, 2021
1 parent 44ae9ee commit fac27c9
Show file tree
Hide file tree
Showing 3 changed files with 2,796 additions and 2,724 deletions.
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

0 comments on commit fac27c9

Please sign in to comment.