code optimization

This commit is contained in:
Vladislav Hristov
2018-06-15 09:33:41 +03:00
parent d5d80ee1b8
commit 187636019c
26 changed files with 776 additions and 669 deletions

View File

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