Skip to content

Instantly share code, notes, and snippets.

@peterbsmyth
Created March 5, 2017 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterbsmyth/87e89eab7624a35896060c202d810234 to your computer and use it in GitHub Desktop.
Save peterbsmyth/87e89eab7624a35896060c202d810234 to your computer and use it in GitHub Desktop.
sample helpers file
local crud = require "kong.api.crud_helpers"
local helpers = require "kong.plugins.YOUR-PLUGIN.helpers"
return {
["/fantastics/"] = {
POST = function(self, dao_factory)
crud.post(self.params, dao_factory.voices)
end,
GET = function(self, dao_factory)
helpers.get(self.params, dao_factory.voices)
end,
DELETE = function(self, dao_factory)
helpers.delete(self.params, dao_factory.voices)
end
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment