lib/learn_web/client/validate_repo.rb in learn-web-1.0.5 vs lib/learn_web/client/validate_repo.rb in learn-web-1.1.0
- old
+ new
@@ -6,14 +6,14 @@
def validate_repo_slug_endpoint
"#{API_ROOT}/repo_slug_validations"
end
def validate_repo_slug(repo_slug:)
- response = @conn.post do |req|
- req.url validate_repo_slug_endpoint
- req.headers['Authorization'] = "Bearer #{token}"
- req.params['repo_slug'] = repo_slug
- end
+ response = post(
+ validate_repo_slug_endpoint,
+ headers: { 'Authorization' => "Bearer #{token}" },
+ params: { 'repo_slug' => repo_slug }
+ )
LearnWeb::Client::ValidateRepo::Slug.new(response)
end
end
end