Created
March 5, 2017 17:14
-
-
Save peterbsmyth/87e89eab7624a35896060c202d810234 to your computer and use it in GitHub Desktop.
sample helpers file
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
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