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:
parent
8fd66b75bf
commit
a6fd2b30bf
4 changed files with 28 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue