mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Server: implement video views
This commit is contained in:
parent
9e167724f7
commit
e4c87ec269
15 changed files with 612 additions and 48 deletions
|
@ -6,6 +6,7 @@ const logger = require('./logger')
|
|||
|
||||
const utils = {
|
||||
badRequest,
|
||||
createEmptyCallback,
|
||||
cleanForExit,
|
||||
generateRandomString,
|
||||
isTestInstance,
|
||||
|
@ -29,6 +30,12 @@ function cleanForExit (webtorrentProcess) {
|
|||
process.kill(-webtorrentProcess.pid)
|
||||
}
|
||||
|
||||
function createEmptyCallback () {
|
||||
return function (err) {
|
||||
if (err) logger.error('Error in empty callback.', { error: err })
|
||||
}
|
||||
}
|
||||
|
||||
function isTestInstance () {
|
||||
return (process.env.NODE_ENV === 'test')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue