Skip to content

Instantly share code, notes, and snippets.

@Jojoooo1
Last active January 29, 2019 15:36
Show Gist options
  • Save Jojoooo1/2620f5a731f2ad7b2550263426da367c to your computer and use it in GitHub Desktop.
Save Jojoooo1/2620f5a731f2ad7b2550263426da367c to your computer and use it in GitHub Desktop.
chaincode-4.js
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