1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Server: move remote routes in their own directory

This commit is contained in:
Chocobozzz 2016-12-30 12:53:41 +01:00
parent 8fd66b75bf
commit a6fd2b30bf
4 changed files with 28 additions and 9 deletions

View file

@ -5,11 +5,16 @@ const crypto = require('crypto')
const logger = require('./logger')
const utils = {
badRequest,
cleanForExit,
generateRandomString,
isTestInstance
}
function badRequest (req, res, next) {
res.type('json').status(400).end()
}
function generateRandomString (size, callback) {
crypto.pseudoRandomBytes(size, function (err, raw) {
if (err) return callback(err)