lib/pact_broker/api/resources/webhook.rb in pact_broker-2.100.0 vs lib/pact_broker/api/resources/webhook.rb in pact_broker-2.101.0

- old
+ new

@@ -20,18 +20,19 @@ def allowed_methods ["GET", "PUT", "DELETE", "OPTIONS"] end + def put_can_create? + true + end + def resource_exists? !!webhook end def malformed_request? - if request.put? - return invalid_json? || webhook_validation_errors?(parsed_webhook, uuid) - end - false + super || (request.put? && webhook_validation_errors?(parsed_webhook, uuid)) end def from_json if webhook @webhook = webhook_service.update_by_uuid(uuid, params(symbolize_names: false))