1
0
Fork 0
peertube/server/tests/fixtures/peertube-plugin-test-two/main.js
2019-07-24 10:58:16 +02:00

21 lines
477 B
JavaScript

async function register ({ registerHook, registerSetting, settingsManager, storageManager, peertubeHelpers }) {
registerHook({
target: 'filter:api.videos.list.params',
handler: obj => addToCount(obj)
})
}
async function unregister () {
return
}
module.exports = {
register,
unregister
}
// ############################################################################
function addToCount (obj) {
return Object.assign({}, obj, { count: obj.count + 1 })
}