aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 14:32:15 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 14:32:15 +0200
commitdf98563e2104b82b119c00a3cd83cd0dc1242d25 (patch)
treea9720bf01bac9ad5646bd3d3c9bc7653617afdad /server
parent46757b477c1adb5f98060d15998a3852e18902a6 (diff)
downloadPeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.gz
PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.tar.zst
PeerTube-df98563e2104b82b119c00a3cd83cd0dc1242d25.zip
Use typescript standard and lint all files
Diffstat (limited to 'server')
-rw-r--r--server/controllers/index.ts6
-rw-r--r--server/helpers/utils.ts1
-rw-r--r--server/initializers/database.ts2
-rw-r--r--server/initializers/migrator.ts1
-rw-r--r--server/lib/friends.ts6
-rw-r--r--server/lib/jobs/handlers/video-transcoder.ts4
6 files changed, 11 insertions, 9 deletions
diff --git a/server/controllers/index.ts b/server/controllers/index.ts
index bb56fd7cf..0223a98f1 100644
--- a/server/controllers/index.ts
+++ b/server/controllers/index.ts
@@ -1,3 +1,3 @@
1export * from './static'; 1export * from './static'
2export * from './client'; 2export * from './client'
3export * from './api'; 3export * from './api'
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index 8e489de96..07c1b3f51 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -1,7 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2 2
3import { pseudoRandomBytes } from 'crypto' 3import { pseudoRandomBytes } from 'crypto'
4import { join } from 'path'
5 4
6import { logger } from './logger' 5import { logger } from './logger'
7 6
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 1662c1968..47604c6b0 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -144,7 +144,7 @@ function getModelFiles (modelDirectory: string, callback: (err: Error, filePaths
144 144
145 return eachCallback(null) 145 return eachCallback(null)
146 }) 146 })
147 }, function(err: Error) { 147 }, function (err: Error) {
148 return callback(err, modelFilePaths) 148 return callback(err, modelFilePaths)
149 }) 149 })
150 }) 150 })
diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts
index d72c60638..d8faaebc6 100644
--- a/server/initializers/migrator.ts
+++ b/server/initializers/migrator.ts
@@ -6,7 +6,6 @@ import * as Sequelize from 'sequelize'
6import { database as db } from './database' 6import { database as db } from './database'
7import { LAST_MIGRATION_VERSION } from './constants' 7import { LAST_MIGRATION_VERSION } from './constants'
8import { logger } from '../helpers' 8import { logger } from '../helpers'
9import { ApplicationInstance } from '../models'
10 9
11function migrate (finalCallback: (err: Error) => void) { 10function migrate (finalCallback: (err: Error) => void) {
12 waterfall([ 11 waterfall([
diff --git a/server/lib/friends.ts b/server/lib/friends.ts
index d07433a5d..522cb82b3 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -103,7 +103,11 @@ function quickAndDirtyUpdateVideoToFriends (qaduParam: QaduParam, transaction?:
103 return createVideoQaduRequest(options, callback) 103 return createVideoQaduRequest(options, callback)
104} 104}
105 105
106function quickAndDirtyUpdatesVideoToFriends (qadusParams: QaduParam[], transaction: Sequelize.Transaction, finalCallback: (err: Error) => void) { 106function quickAndDirtyUpdatesVideoToFriends (
107 qadusParams: QaduParam[],
108 transaction: Sequelize.Transaction,
109 finalCallback: (err: Error) => void
110) {
107 const tasks = [] 111 const tasks = []
108 112
109 qadusParams.forEach(function (qaduParams) { 113 qadusParams.forEach(function (qaduParams) {
diff --git a/server/lib/jobs/handlers/video-transcoder.ts b/server/lib/jobs/handlers/video-transcoder.ts
index efa18ef2d..6f606a7d3 100644
--- a/server/lib/jobs/handlers/video-transcoder.ts
+++ b/server/lib/jobs/handlers/video-transcoder.ts
@@ -13,9 +13,9 @@ function process (data: { id: string }, callback: (err: Error, videoInstance?: V
13 }) 13 })
14} 14}
15 15
16function onError (err: Error, jobId: number, video: VideoInstance, callback: () => void) { 16function onError (err: Error, jobId: number, video: VideoInstance, callback: (err: Error) => void) {
17 logger.error('Error when transcoding video file in job %d.', jobId, { error: err }) 17 logger.error('Error when transcoding video file in job %d.', jobId, { error: err })
18 return callback() 18 return callback(null)
19} 19}
20 20
21function onSuccess (data: any, jobId: number, video: VideoInstance, callback: (err: Error) => void) { 21function onSuccess (data: any, jobId: number, video: VideoInstance, callback: (err: Error) => void) {