kafka-ui/api/plugins/support.js
2019-12-24 18:20:11 +03:00

21 lines
482 B
JavaScript

'use strict'
const fp = require('fastify-plugin')
// the use of fastify-plugin is required to be able
// to export the decorators to the outer scope
module.exports = fp(function (fastify, opts, next) {
fastify.decorate('someSupport', function () {
return 'hugs'
})
next()
})
// If you prefer async/await, use the following
//
// module.exports = fp(async function (fastify, opts) {
// fastify.decorate('someSupport', function () {
// return 'hugs'
// })
// })