Skip to content

Instantly share code, notes, and snippets.

@chrisabrams
Last active September 22, 2016 15:32
Show Gist options
  • Save chrisabrams/1bdceb86d7bac5625d996b79bc4cdcef to your computer and use it in GitHub Desktop.
Save chrisabrams/1bdceb86d7bac5625d996b79bc4cdcef to your computer and use it in GitHub Desktop.
idea
export default function pluginInterface(props = {}) {
const Model = modelInterface(props.Model)
const Controller = controllerInterface(props.Controller, Model)
const ChargeModel = chargeModelInterface(Model)
const ChargeController = chargeControllerInterface(Controller, ChargeModel)
return [
{
Controller: ChargeController,
migrations: chargeMigrations,
Model: ChargeModel,
routeName: 'charges',
routes: chargeRouteInterface({
Controller: ChargeController
})
}
]
}
const settings = {
pluginName: 'payments'
}
export {settings}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment