From 656246c8902a3bcdadbde8c7ad4cba576be85433 Mon Sep 17 00:00:00 2001 From: Jason Macgowan <1389531+jasonmacgowan@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:39:50 -0500 Subject: [PATCH] fix github-server? --- spec/acceptance/github-server/web.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/acceptance/github-server/web.rb b/spec/acceptance/github-server/web.rb index 374bc27..8d61817 100644 --- a/spec/acceptance/github-server/web.rb +++ b/spec/acceptance/github-server/web.rb @@ -226,7 +226,6 @@ def graphql_pending_query(query) send :put, "/entitlements-app-acceptance/orgs/:role" do org_dir = File.join(BASE_DIR, "org", params["role"]) - request.body.rewind postdata = JSON.parse(request.body.read) Dir.glob(File.join(org_dir, "*")).each { |filename| FileUtils.rm_f(filename) } 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) send :put, "/entitlements-app-acceptance/pending" do pending_dir = File.join(BASE_DIR, "pending") - request.body.rewind postdata = JSON.parse(request.body.read) Dir.glob(File.join(pending_dir, "*")).each { |filename| FileUtils.rm_f(filename) } 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) end send :post, "/graphql" do - request.body.rewind postdata = JSON.parse(request.body.read) query = postdata["query"] @@ -299,8 +296,6 @@ def graphql_pending_query(query) # Check for case sensitivity concerns halt 400 unless params["username"] == params["username"].downcase - # Pull out the role from the request body, halt if not provided. - request.body.rewind postdata = JSON.parse(request.body.read) halt 400 unless %[admin member].include?(postdata["role"])