Skip to content

Commit

Permalink
fix github-server?
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmacgowan committed Dec 18, 2024
1 parent 8d7ad9e commit 656246c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions spec/acceptance/github-server/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
Expand All @@ -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 } }
Expand All @@ -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"]

Expand Down Expand Up @@ -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"])

Expand Down

0 comments on commit 656246c

Please sign in to comment.