Skip to content

Commit

Permalink
fix: build new image
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxing-wang-ey committed Jan 15, 2025
1 parent 7306f48 commit 869e7e9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
build-args: |
GPR_TOKEN=${{ secrets.GPR_TOKEN }}
tags: |
ghcr.io/eyblockchain/multiple-contracts-wwx:with-health-check
ghcr.io/eyblockchain/multiple-contracts-wwx:latest
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
no-cache: true
Expand Down
48 changes: 24 additions & 24 deletions merkle-tree/src/middleware/assign-db-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ export default async function(req, res, next) {
2,
)}`,
);
// if (req.path === '/healthcheck') {
return next();
// }
// try {
// const contractId = req.body.contractId;
// let contractName = req.body.contractName || req.query.contractName;
// if (contractName === undefined) {
// const contractNameTest = req.body[0].contractName;
// if (contractNameTest === undefined) {
// throw new Error('No contractName key provided in req.body.');
// } else {
// contractName = contractNameTest;
// }
// }
// const treeId = req.body.treeId || req.query.treeId;
// logger.silly(`treeId: ${treeId}`);
// req.user = {};
// // give all requesters admin privileges:
// req.user.connection = adminDbConnection;
if (req.path === '/healthcheck') {
return next();
}
try {
const contractId = req.body.contractId;
let contractName = req.body.contractName || req.query.contractName;
if (contractName === undefined) {
const contractNameTest = req.body[0].contractName;
if (contractNameTest === undefined) {
throw new Error('No contractName key provided in req.body.');
} else {
contractName = contractNameTest;
}
}
const treeId = req.body.treeId || req.query.treeId;
logger.silly(`treeId: ${treeId}`);
req.user = {};
// give all requesters admin privileges:
req.user.connection = adminDbConnection;

// req.user.db = new DB(req.user.connection, admin, contractName, treeId, contractId);
req.user.db = new DB(req.user.connection, admin, contractName, treeId, contractId);

// return next();
// } catch (err) {
// return next(err);
// }
return next();
} catch (err) {
return next(err);
}
}

0 comments on commit 869e7e9

Please sign in to comment.