mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2025-08-14 03:35:36 +00:00
client and order optimization
This commit is contained in:
@@ -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');
|
||||
},
|
||||
|
Reference in New Issue
Block a user