Feat(plugins) Pass plugin options to the routes to be able to access specific options from the plugin configuration (#959)

This commit is contained in:
Adrien de Peretti
2022-01-04 15:56:00 +01:00
committed by GitHub
parent 180fb17503
commit ae839513b8
+1 -1
View File
@@ -175,7 +175,7 @@ function registerApi(
try {
const routes = require(`${pluginDetails.resolve}/api`).default
if (routes) {
app.use("/", routes(rootDirectory))
app.use("/", routes(rootDirectory, pluginDetails.options))
}
return app
} catch (err) {