This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 3cb36d1 Success processing may vary
3cb36d1 is described below
commit 3cb36d13f901421e79afdd620251d43b9280a1d9
Author: Sebb <[email protected]>
AuthorDate: Sat Dec 16 18:30:14 2017 +0000
Success processing may vary
---
www/roster/views/utils.js.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/roster/views/utils.js.rb b/www/roster/views/utils.js.rb
index e287aa7..1d68c68 100644
--- a/www/roster/views/utils.js.rb
+++ b/www/roster/views/utils.js.rb
@@ -1,12 +1,12 @@
class Utils
- # Common processing to handle a response
- # called from e.g. fetch($options.add_action, args).then {|response| ...
- def self.handle_response(response)
+
+ # Common processing to handle a response that is expected to be JSON
+ def self.handle_json(response, success)
content_type = response.headers.get('content-type') || ''
isJson = content_type.include? 'json'
if response.status == 200 and isJson
response.json().then do |json|
- Vue.emit :update, json
+ success json
end
else
footer = 'See server log for full details'
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].