Skip to content

Commit

Permalink
fix: healthcheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxing-wang-ey committed Jan 15, 2025
1 parent e3cbb48 commit d490dd2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions merkle-tree/src/middleware/assign-db-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ export default async function(req, res, next) {
2,
)}`,
);

if (req.path === '/healthcheck') {
return next();
}
try {
const contractId = req.body.contractId;
logger.silly(`before request.body.contractName`);
let contractName = req.body.contractName || req.query.contractName;
if (contractName === undefined) {
// const contractNameTest = req.body[0].contractName;
logger.silly(`before setting no-contract-name`);
const contractNameTest = 'no-contract-name'
const contractNameTest = req.body[0].contractName;
if (contractNameTest === undefined) {
throw new Error('No contractName key provided in req.body.');
} else {
Expand Down

0 comments on commit d490dd2

Please sign in to comment.