(userId)
| 3 | |
| 4 | const chaincodeModel = firestore.collection("chaincodes"); |
| 5 | const 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 | |
| 18 | module.exports = { |
| 19 | storeChaincode, |
nothing calls this directly
no outgoing calls
no test coverage detected