Skip to content

Commit

Permalink
Use patch method declared in the azure client
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Feb 24, 2023
1 parent 7b7bb77 commit 06bacc7
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions updater/bin/azure_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,28 +145,6 @@ def put_with_token(url, json, token)

response
end

def patch(url, json)
response = Excon.patch(
url,
body: json,
user: credentials&.fetch("username", nil),
password: credentials&.fetch("password", nil),
idempotent: true,
**SharedHelpers.excon_defaults(
headers: auth_header.merge(
{
"Content-Type" => "application/json"
}
)
)
)
raise Unauthorized if response.status == 401
raise Forbidden if response.status == 403
raise NotFound if response.status == 404

response
end
end
end
end

0 comments on commit 06bacc7

Please sign in to comment.