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

Send server announce when users upload a video

This commit is contained in:
Chocobozzz 2017-11-16 11:08:25 +01:00
parent d846501818
commit efc32059d9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 161 additions and 80 deletions

View file

@ -20,9 +20,6 @@ import * as bcrypt from 'bcrypt'
import * as createTorrent from 'create-torrent'
import * as rimraf from 'rimraf'
import * as pem from 'pem'
import * as jsonld from 'jsonld'
import * as jsig from 'jsonld-signatures'
jsig.use('jsonld', jsonld)
function isTestInstance () {
return process.env.NODE_ENV === 'test'
@ -120,8 +117,6 @@ const bcryptHashPromise = promisify2<any, string | number, string>(bcrypt.hash)
const createTorrentPromise = promisify2<string, any, any>(createTorrent)
const rimrafPromise = promisify1WithVoid<string>(rimraf)
const statPromise = promisify1<string, Stats>(stat)
const jsonldSignPromise = promisify2<object, { privateKeyPem: string, creator: string }, object>(jsig.sign)
const jsonldVerifyPromise = promisify2<object, object, object>(jsig.verify)
// ---------------------------------------------------------------------------
@ -150,7 +145,5 @@ export {
bcryptHashPromise,
createTorrentPromise,
rimrafPromise,
statPromise,
jsonldSignPromise,
jsonldVerifyPromise
statPromise
}