whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 473e574: include credentials and other cleanup
Date Mon, 15 Feb 2016 00:47:59 GMT
Commit 473e574b5e776cf778f1de254115ad25bb8107e5:
    include credentials and other cleanup


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/roster/views/actions/.committee.json.rb.swp              |  
www/roster/views/committee.js.rb                             | +++++++++ ---
------------------------------------------------------------
12 changes: 9 additions, 3 deletions.
------------------------------------------------------------


diff --git a/www/roster/views/actions/.committee.json.rb.swp b/www/roster/views/actions/.committee.json.rb.swp
deleted file mode 100644
index 168efe4..0000000
Binary files a/www/roster/views/actions/.committee.json.rb.swp and /dev/null differ
diff --git a/www/roster/views/committee.js.rb b/www/roster/views/committee.js.rb
index 17a7948..6150c65 100644
--- a/www/roster/views/committee.js.rb
+++ b/www/roster/views/committee.js.rb
@@ -395,11 +395,17 @@ def componentDidMount()
   end
 
   def post()
-    args = {method: 'post', headers: {'Content-Type' => 'application/json'}}
-
+    # parse action extracted from the button
     targets = @action.split(' ')
     action = targets.shift()
-    args.body = {pmc: @@pmc, id: @id, action: action, targets: targets}.inspect
+
+    # construct arguments to fetch
+    args = {
+      method: 'post',
+      credentials: 'include',
+      headers: {'Content-Type' => 'application/json'},
+      body: {pmc: @@pmc, id: @id, action: action, targets: targets}.inspect
+    }
 
     fetch('actions/committee', args).then {|response|
       content_type = response.headers.get('content-type') || ''

Mime
View raw message