blob: 71c11b2bacecb03c7bb5e8b397e55f0c1967e7b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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 })
}
|