@fabric-es/fabric-cqrs
Version:
Hyperledger Fabric middleware for event sourcing and cqrs pattern
22 lines • 845 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.commandGetByEntityName = void 0;
const command_1 = require("../store/command");
const _1 = require(".");
const commandGetByEntityName = (entityName, isPrivateData, { channelName, connectionProfile, wallet, store, logger }) => _1.dispatcher(({ tx_id }) => command_1.action.queryByEntityName({
connectionProfile,
channelName,
wallet,
tx_id,
args: { entityName, isPrivateData },
}), {
name: 'command_getByEntityName',
store,
slice: 'write',
SuccessAction: command_1.action.QUERY_SUCCESS,
ErrorAction: command_1.action.QUERY_ERROR,
logger,
typeGuard: _1.isCommitRecord,
}, (result) => Object.values(result));
exports.commandGetByEntityName = commandGetByEntityName;
//# sourceMappingURL=commandGetByEntityName.js.map