client and order optimization

This commit is contained in:
Vladislav Hristov
2018-06-20 12:20:03 +03:00
parent 187636019c
commit 945499290a
15 changed files with 259 additions and 194 deletions

View File

@@ -3,10 +3,10 @@
const H004Serializer = require('../orders/H004/serializer');
module.exports = {
use(order) {
use(order, client) {
const { version } = order;
if (version.toUpperCase() === 'H004') return H004Serializer.use(order);
if (version.toUpperCase() === 'H004') return H004Serializer.use(order, client);
throw Error('Error middleware/serializer.js: Invalid version number');
},