aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-two/main.js
blob: 71c11b2bacecb03c7bb5e8b397e55f0c1967e7b0 (plain) (tree)



















                                                                                                               
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 })
}