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

Function storeChaincode

models/chaincodes.js:5–16  ·  view source on GitHub ↗
(userId)

Source from the content-addressed store, hash-verified

3
4const chaincodeModel = firestore.collection("chaincodes");
5const storeChaincode = async (userId) => {
6 try {
7 const userChaincode = await chaincodeModel.add({
8 userId,
9 timestamp: Timestamp.fromDate(new Date()),
10 });
11 return userChaincode.id;
12 } catch (error) {
13 logger.error("Error in creating chaincode", error);
14 throw error;
15 }
16};
17
18module.exports = {
19 storeChaincode,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected