-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(admin) proper support for `PUT /{entities}/{entity}/plugins/{plug…
…in}` Prior to this patch, `PUT` requests to plugins under their associated resources (e.g. `/services/{service}/plugins/{plugin}`) would systematically return `404`, instead of creating the plugin if it did not exist. This was because the `before` Lapis hook attempts to retrieve the plugin in the database before modifying it. Those endpoints are preserved for backwards-compatibility purposes (being too nested to be auto-generated), so that workaround is fine. This patch ensures that we skip this logic with `PUT` requests, plus makes sure that we set the `self.args.post` arguments according to the `self.params` arguments (path segments with foreign UUIDs). Thanks @gszr for the report. From #4288
- Loading branch information
1 parent
61112d3
commit 6c1fb39
Showing
2 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters