-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(admin) add /consumers/:id/plugins routes #2714
Conversation
835b571
to
61fefe0
Compare
2de4a1b
to
aab58f5
Compare
aab58f5
to
d47d1a5
Compare
d47d1a5
to
0f1f81f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
fields = { | ||
value = { typ = "string" } | ||
value = { typ = "string" }, | ||
extra = { typ = "string", default = "extra" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: please use a trailing comma here, so future diffs will be easier (if the existing line would have had a trailing comma, this diff would have been only 1 line, instead of 3 now)
0f1f81f
to
1fffd6e
Compare
}) | ||
assert.res_status(204, res) | ||
end) | ||
describe("errors #focus", function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the #focus label only for debugging purposes?
kong/api/routes/consumers.lua
Outdated
crud.find_consumer_by_username_or_id(self, dao_factory, helpers) | ||
crud.find_plugin_by_filter(self, dao_factory, { | ||
consumer_id = self.consumer.id, | ||
id = self.params.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: such tables could use a trailing comma, as documented in our style guide, to reduce the diff size of future changes applied here.
1fffd6e
to
07d12b3
Compare
Summary
Adds CRUD routes for plugins scoped by consumers to the admin API:
/consumers/:username_or_id/plugins/
/consumers/:username_or_id/plugins/id
This PR needs #2726 to be merged before it, otherwise the api route tests will fail.
Issues resolved
Closes #2336