Skip to content

Commit

Permalink
fix: fix config async changes (#229)
Browse files Browse the repository at this point in the history
* fix: fix config async changes

* chore(snapshot): 15.6.3-snapshot.0

* dep audit

* chore(snapshot): 15.6.3-snapshot.1

* chore: default user to null in outbound

* chore: remove await

* async
  • Loading branch information
kleyow authored Jan 10, 2023
1 parent 0c5101c commit 25d1336
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
6 changes: 4 additions & 2 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"GHSA-8qr4-xgw6-wmr3",
// json web token, no fix available
"GHSA-8cf7-32gw-wr33",
"GHSA-8cf7-32gw-wr33"
"GHSA-8cf7-32gw-wr33",
"GHSA-27h2-hvpr-p74q",
"GHSA-qwph-4952-7xr6"
]
}
}
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ml-testing-toolkit",
"description": "Testing Toolkit for Mojaloop implementations",
"version": "15.6.2",
"version": "15.6.3-snapshot.1",
"license": "Apache-2.0",
"author": "Vijaya Kumar Guthi, ModusBox Inc. ",
"contributors": [
Expand Down Expand Up @@ -89,7 +89,7 @@
"json-refs": "^3.0.15",
"json-rules-engine": "6.1.2",
"lodash": "^4.17.21",
"mongoose": "^6.8.2",
"mongoose": "^6.8.3",
"multer": "^1.4.3",
"mustache": "4.2.0",
"mv": "^2.1.1",
Expand All @@ -116,7 +116,7 @@
},
"devDependencies": {
"@types/jest": "^29.2.5",
"audit-ci": "^6.5.0",
"audit-ci": "^6.6.0",
"get-port": "6.1.2",
"jest": "^28.1.3",
"jest-junit": "^15.0.0",
Expand Down
10 changes: 4 additions & 6 deletions src/lib/api-routes/outbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ router.post('/template/:traceID', [
}
const traceID = req.params.traceID
const inputJson = JSON.parse(JSON.stringify(req.body))
const userConfig = await Config.getUserConfig()
// TODO: Change the following value to the dfspId based ont he login incase HOSTING_ENABLED
const dfspId = req.user ? req.user.dfspId : userConfig.DEFAULT_USER_FSPID
// TODO: Change the following value to the dfspId based on the login incase HOSTING_ENABLED
const dfspId = req.user ? req.user.dfspId : null
outbound.OutboundSend(inputJson, traceID, dfspId)

return res.status(200).json({ status: 'OK' })
Expand All @@ -101,9 +100,8 @@ router.post('/template_iterations/:traceID', [
}
const traceID = req.params.traceID
const inputJson = JSON.parse(JSON.stringify(req.body))
const userConfig = await Config.getUserConfig()
// TODO: Change the following value to the dfspId based ont he login incase HOSTING_ENABLED
const dfspId = req.user ? req.user.dfspId : userConfig.DEFAULT_USER_FSPID
// TODO: Change the following value to the dfspId based on the login incase HOSTING_ENABLED
const dfspId = req.user ? req.user.dfspId : null
outbound.OutboundSendLoop(inputJson, traceID, dfspId, req.query.iterationCount)

return res.status(200).json({ status: 'OK' })
Expand Down

0 comments on commit 25d1336

Please sign in to comment.