You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/02/15 01:47:59 UTC
[whimsy.git] [1/1] Commit 473e574: include credentials and other cleanup
Commit 473e574b5e776cf778f1de254115ad25bb8107e5:
include credentials and other cleanup
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@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') || ''