MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / generateChaincode

Function generateChaincode

controllers/users.js:811–825  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

809 logger.error(`Error while updating user data: ${error}`);
810 return res.boom.badImplementation(INTERNAL_SERVER_ERROR);
811 }
812};
813
814const generateChaincode = async (req, res) => {
815 try {
816 const { id } = req.userData;
817 const devFeatureFlag = req.query.dev === "true";
818 const chaincode = await chaincodeQuery.storeChaincode(id);
819 await userQuery.addOrUpdate({ chaincode }, id, devFeatureFlag);
820 return res.json({
821 chaincode,
822 message: "Chaincode returned successfully",
823 });
824 } catch (error) {
825 logger.error(`Error while generating chaincode: ${error}`);
826 return res.boom.badImplementation(INTERNAL_SERVER_ERROR);
827 }
828};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected