Comparing version 1.0.11 to 1.0.12
@@ -228,2 +228,3 @@ const fetch = require('node-fetch'); | ||
savedResponse.responseJSON = jsonResponse; | ||
this.emit("response:handled", this, jsonResponse, savedResponse); | ||
this._fireResponse("success", this, [this, jsonResponse, savedResponse], options); | ||
@@ -230,0 +231,0 @@ }) |
@@ -268,2 +268,3 @@ const fetch = require('node-fetch'); | ||
savedResponse.responseJSON = jsonResponse; | ||
this.emit("response:handled", this, jsonResponse, savedResponse); | ||
this._fireResponse("success", this, [this, jsonResponse, savedResponse], options); | ||
@@ -270,0 +271,0 @@ }) |
{ | ||
"name": "wapp-api", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Helper functions to speed up wapp development process.", | ||
@@ -5,0 +5,0 @@ "main": "wappsto/index.js", |
@@ -99,13 +99,17 @@ const Request = require('../models/request'); | ||
callStatusChange.call(context, options, STATUS.ACCEPTED, context, response); | ||
if(options.subscribe === true && this._wStream){ | ||
this._wStream.subscribe(context); | ||
} | ||
resolve(response); | ||
context.on("response:handled", () => { | ||
if(options.subscribe === true && this._wStream){ | ||
this._wStream.subscribe(context); | ||
} | ||
}); | ||
} | ||
} else { | ||
callStatusChange.call(context, options, STATUS.ACCEPTED); | ||
if(options.subscribe === true && this._wStream){ | ||
this._wStream.subscribe(context); | ||
} | ||
resolve(response); | ||
context.on("response:handled", () => { | ||
if(options.subscribe === true && this._wStream){ | ||
this._wStream.subscribe(context); | ||
} | ||
}); | ||
} | ||
@@ -112,0 +116,0 @@ } |
Sorry, the diff of this file is too big to display
378758
10763