Skip to content

Commit 869e7e9

Browse files
fix: build new image
1 parent 7306f48 commit 869e7e9

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/release-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
build-args: |
3838
GPR_TOKEN=${{ secrets.GPR_TOKEN }}
3939
tags: |
40-
ghcr.io/eyblockchain/multiple-contracts-wwx:with-health-check
40+
ghcr.io/eyblockchain/multiple-contracts-wwx:latest
4141
# username: ${{ github.actor }}
4242
# password: ${{ secrets.GITHUB_TOKEN }}
4343
no-cache: true

merkle-tree/src/middleware/assign-db-connection.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ export default async function(req, res, next) {
1414
2,
1515
)}`,
1616
);
17-
// if (req.path === '/healthcheck') {
18-
return next();
19-
// }
20-
// try {
21-
// const contractId = req.body.contractId;
22-
// let contractName = req.body.contractName || req.query.contractName;
23-
// if (contractName === undefined) {
24-
// const contractNameTest = req.body[0].contractName;
25-
// if (contractNameTest === undefined) {
26-
// throw new Error('No contractName key provided in req.body.');
27-
// } else {
28-
// contractName = contractNameTest;
29-
// }
30-
// }
31-
// const treeId = req.body.treeId || req.query.treeId;
32-
// logger.silly(`treeId: ${treeId}`);
33-
// req.user = {};
34-
// // give all requesters admin privileges:
35-
// req.user.connection = adminDbConnection;
17+
if (req.path === '/healthcheck') {
18+
return next();
19+
}
20+
try {
21+
const contractId = req.body.contractId;
22+
let contractName = req.body.contractName || req.query.contractName;
23+
if (contractName === undefined) {
24+
const contractNameTest = req.body[0].contractName;
25+
if (contractNameTest === undefined) {
26+
throw new Error('No contractName key provided in req.body.');
27+
} else {
28+
contractName = contractNameTest;
29+
}
30+
}
31+
const treeId = req.body.treeId || req.query.treeId;
32+
logger.silly(`treeId: ${treeId}`);
33+
req.user = {};
34+
// give all requesters admin privileges:
35+
req.user.connection = adminDbConnection;
3636

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

39-
// return next();
40-
// } catch (err) {
41-
// return next(err);
42-
// }
39+
return next();
40+
} catch (err) {
41+
return next(err);
42+
}
4343
}

0 commit comments

Comments
 (0)