Fix response actions

This commit is contained in:
Dennis Eichhorn 2018-03-30 17:04:54 +02:00
parent f6e2f23ece
commit fa8a454803

View File

@ -218,8 +218,9 @@
try { try {
const o = JSON.parse(xhr.response), const o = JSON.parse(xhr.response),
response = new jsOMS.Message.Response.Response(o); response = new jsOMS.Message.Response.Response(o);
let tempResponse = null, let successInject = null;
successInject = null;
console.log(response);
if (typeof o.status !== 'undefined') { if (typeof o.status !== 'undefined') {
self.app.notifyManager.send( self.app.notifyManager.send(
@ -228,9 +229,9 @@
} }
if ((successInject = form.getSuccess()) !== null) { if ((successInject = form.getSuccess()) !== null) {
successInject(tempResponse); successInject(response);
} else { } else {
self.app.responseManager.run(tempResponse.type, tempResponse, request); self.app.responseManager.run(response.get(0).type, response.get(0), request);
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);