Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #15608: When creating a rule via the API the id parameter is only read from url parameters, and not from json #2436

Conversation

VinceMacBuche
Copy link
Member

@VinceMacBuche VinceMacBuche force-pushed the bug_15608/when_creating_a_rule_via_the_api_the_id_parameter_is_only_read_from_url_parameters_and_not_from_json branch from e09bfb0 to 9643bfc Compare September 3, 2019 13:47
@VinceMacBuche
Copy link
Member Author

Commit modified

} else {
val restRule = restExtractor.extractRule(req.params)
apiV2.createRule(restRule, req)
implicit var action = "createRule"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no implicit var please, each one is terrible for understanding, both together...
Please only implicit val

}

actionResponse(response, req, "Could not create Rule", None, authzToken.actor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why None here? Shouldn't it depend of the kind of response?

…ly read from url parameters, and not from json
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the bug_15608/when_creating_a_rule_via_the_api_the_id_parameter_is_only_read_from_url_parameters_and_not_from_json branch from 9643bfc to 4637177 Compare September 3, 2019 16:32
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/2436
-- Your faithful QA
Kant merge: "Science is organized knowledge. Wisdom is organized life."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/14375/console)

@VinceMacBuche
Copy link
Member Author

OK, merging this PR

@VinceMacBuche VinceMacBuche merged commit 4637177 into Normation:branches/rudder/5.0 Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants