PeerTube/server/tests/fixtures/peertube-plugin-test-two/main.js

22 lines
477 B
JavaScript
Raw Normal View History

2019-07-19 17:30:41 +02:00
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 })
}