amphora icon indicating copy to clipboard operation
amphora copied to clipboard

initPlugins parameters object

Open james-owen opened this issue 6 years ago • 2 comments

Is your feature request related to a problem? Please describe.

When initializing plugins, occasionally several arguments are needed, which makes for too many arguments being passed to a single function.

Describe the solution you'd like

The function initPlugins in plugins.js should pass an object to each plugin.

Current: plugin(router, pluginDBAdapter, publish, sites)

Suggested: plugin(router, paramsObject)

james-owen avatar Apr 10 '19 21:04 james-owen

Pull request to add a 5th parameter to this function #655

james-owen avatar Apr 15 '19 13:04 james-owen

@PedroAlbR Considering getting the params object started now, while we're working with plugins and potentially adding more params. The params would look like this: plugin(router, pluginDBAdapter, publish, sites, paramsObj) instead of the current: plugin(router, pluginDBAdapter, publish, sites, site, [additional params])

james-owen avatar Apr 18 '19 13:04 james-owen