2017-10-24 16:02:08 +02:00
|
|
|
function Plugin(config, stuff) {
|
2018-06-22 20:54:14 +02:00
|
|
|
const self = Object.create(Plugin.prototype);
|
|
|
|
|
|
|
|
self._config = config;
|
|
|
|
return self;
|
2017-10-24 16:02:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Plugin.prototype.register_middlewares = function (app, auth, storage) {
|
|
|
|
|
2018-06-22 20:54:14 +02:00
|
|
|
const {message} = this._config;
|
2017-10-24 16:02:08 +02:00
|
|
|
app.get('/test/route', function (req, res, next) {
|
2018-06-22 20:54:14 +02:00
|
|
|
res.status(200);
|
|
|
|
|
2017-10-24 16:02:08 +02:00
|
|
|
return next({ ok: message })
|
|
|
|
});
|
2018-06-22 20:54:14 +02:00
|
|
|
|
2017-10-24 16:02:08 +02:00
|
|
|
}
|
2018-06-22 20:54:14 +02:00
|
|
|
|
|
|
|
module.exports = Plugin;
|