@@ -226,7 +226,6 @@ def graphql_pending_query(query)
226226
227227 send :put , "/entitlements-app-acceptance/orgs/:role" do
228228 org_dir = File . join ( BASE_DIR , "org" , params [ "role" ] )
229- request . body . rewind
230229 postdata = JSON . parse ( request . body . read )
231230 Dir . glob ( File . join ( org_dir , "*" ) ) . each { |filename | FileUtils . rm_f ( filename ) }
232231 postdata [ "users" ] . each { |user | File . open ( File . join ( org_dir , user ) , "w" ) { |f | f . puts Time . now . to_s } }
@@ -235,7 +234,6 @@ def graphql_pending_query(query)
235234
236235 send :put , "/entitlements-app-acceptance/pending" do
237236 pending_dir = File . join ( BASE_DIR , "pending" )
238- request . body . rewind
239237 postdata = JSON . parse ( request . body . read )
240238 Dir . glob ( File . join ( pending_dir , "*" ) ) . each { |filename | FileUtils . rm_f ( filename ) }
241239 postdata [ "users" ] . each { |user | File . open ( File . join ( pending_dir , user ) , "w" ) { |f | f . puts Time . now . to_s } }
@@ -260,7 +258,6 @@ def graphql_pending_query(query)
260258 end
261259
262260 send :post , "/graphql" do
263- request . body . rewind
264261 postdata = JSON . parse ( request . body . read )
265262 query = postdata [ "query" ]
266263
@@ -299,8 +296,6 @@ def graphql_pending_query(query)
299296 # Check for case sensitivity concerns
300297 halt 400 unless params [ "username" ] == params [ "username" ] . downcase
301298
302- # Pull out the role from the request body, halt if not provided.
303- request . body . rewind
304299 postdata = JSON . parse ( request . body . read )
305300 halt 400 unless %[admin member] . include? ( postdata [ "role" ] )
306301
0 commit comments