Last active
January 29, 2019 15:36
-
-
Save Jojoooo1/2620f5a731f2ad7b2550263426da367c to your computer and use it in GitHub Desktop.
chaincode-4.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shim from 'fabric-shim'; | |
import util from 'util'; | |
import * as Codigo from './controllers/codigo'; | |
export default class Chaincode { | |
// [...] | |
// Function for creating batch of tracking code | |
async solicitarCodigo(stub, args) { | |
try { | |
await Codigo.solicitarCodigo(stub, args); | |
} catch (err) { | |
throw new Error(err.message ? err.message : 'Por favor tente novamente mais tarde'); | |
} | |
} | |
// [...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment