aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-25 16:52:01 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-26 09:11:38 +0200
commitd412e80e5f748f92118541a5334c14ebd4a90881 (patch)
tree3f0a240fadc0cf1f63ef087515b2e2cd253a6b79 /server
parent404b54e14f6623c1644a8c87ca22f4bab98d5484 (diff)
downloadPeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.tar.gz
PeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.tar.zst
PeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.zip
Fix lint
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/users.ts2
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/helpers/peertube-crypto.ts4
-rw-r--r--server/initializers/database.ts2
-rw-r--r--server/lib/request/abstract-request-scheduler.ts2
-rw-r--r--server/lib/request/request-video-qadu-scheduler.ts2
-rw-r--r--server/middlewares/validators/videos.ts2
-rw-r--r--server/models/video/video-interface.ts1
-rw-r--r--server/tests/api/check-params/video-channels.ts1
-rw-r--r--server/tests/api/video-channels.ts2
10 files changed, 8 insertions, 12 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index a7528328a..b49d37d4e 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -196,7 +196,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
196 196
197 await user.save() 197 await user.save()
198 198
199 return await res.sendStatus(204) 199 return res.sendStatus(204)
200} 200}
201 201
202async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) { 202async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) {
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 7ebbf4d6e..9e233a8cc 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -41,7 +41,7 @@ import {
41 getVideoFileHeight, 41 getVideoFileHeight,
42 resetSequelizeInstance 42 resetSequelizeInstance
43} from '../../../helpers' 43} from '../../../helpers'
44import { TagInstance, VideoInstance } from '../../../models' 44import { VideoInstance } from '../../../models'
45import { VideoCreate, VideoUpdate } from '../../../../shared' 45import { VideoCreate, VideoUpdate } from '../../../../shared'
46 46
47import { abuseVideoRouter } from './abuse' 47import { abuseVideoRouter } from './abuse'
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts
index 47f0243e7..fbc3bdcc2 100644
--- a/server/helpers/peertube-crypto.ts
+++ b/server/helpers/peertube-crypto.ts
@@ -58,7 +58,7 @@ async function sign (data: string|Object) {
58 sign.update(dataString, 'utf8') 58 sign.update(dataString, 'utf8')
59 59
60 const myKey = await getMyPrivateCert() 60 const myKey = await getMyPrivateCert()
61 return await sign.sign(myKey, SIGNATURE_ENCODING) 61 return sign.sign(myKey, SIGNATURE_ENCODING)
62} 62}
63 63
64function comparePassword (plainPassword: string, hashPassword: string) { 64function comparePassword (plainPassword: string, hashPassword: string) {
@@ -68,7 +68,7 @@ function comparePassword (plainPassword: string, hashPassword: string) {
68async function createCertsIfNotExist () { 68async function createCertsIfNotExist () {
69 const exist = await certsExist() 69 const exist = await certsExist()
70 if (exist === true) { 70 if (exist === true) {
71 return undefined 71 return
72 } 72 }
73 73
74 return await createCerts() 74 return await createCerts()
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index ade72b62f..b410b0c18 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -96,7 +96,7 @@ database.init = async (silent: boolean) => {
96 96
97 if (!silent) logger.info('Database %s is ready.', dbname) 97 if (!silent) logger.info('Database %s is ready.', dbname)
98 98
99 return undefined 99 return
100} 100}
101 101
102// --------------------------------------------------------------------------- 102// ---------------------------------------------------------------------------
diff --git a/server/lib/request/abstract-request-scheduler.ts b/server/lib/request/abstract-request-scheduler.ts
index f46682824..08e371a02 100644
--- a/server/lib/request/abstract-request-scheduler.ts
+++ b/server/lib/request/abstract-request-scheduler.ts
@@ -146,7 +146,7 @@ abstract class AbstractRequestScheduler <T> {
146 this.afterRequestsHook() 146 this.afterRequestsHook()
147 147
148 // All the requests were made, we update the pods score 148 // All the requests were made, we update the pods score
149 await db.Pod.updatePodsScore(goodPods, badPods) 149 db.Pod.updatePodsScore(goodPods, badPods)
150 } 150 }
151 151
152 protected afterRequestHook () { 152 protected afterRequestHook () {
diff --git a/server/lib/request/request-video-qadu-scheduler.ts b/server/lib/request/request-video-qadu-scheduler.ts
index a54efc111..24ee59d29 100644
--- a/server/lib/request/request-video-qadu-scheduler.ts
+++ b/server/lib/request/request-video-qadu-scheduler.ts
@@ -95,7 +95,7 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa
95 95
96 default: 96 default:
97 logger.error('Unknown request video QADU type %s.', request.type) 97 logger.error('Unknown request video QADU type %s.', request.type)
98 return 98 return undefined
99 } 99 }
100 100
101 // Do not forget the uuid so the remote pod can identify the video 101 // Do not forget the uuid so the remote pod can identify the video
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts
index 8a9b383b8..a032d14ce 100644
--- a/server/middlewares/validators/videos.ts
+++ b/server/middlewares/validators/videos.ts
@@ -79,7 +79,7 @@ const videosAddValidator = [
79 }) 79 })
80 .then(duration => { 80 .then(duration => {
81 // Previous test failed, abort 81 // Previous test failed, abort
82 if (duration === undefined) return 82 if (duration === undefined) return undefined
83 83
84 if (!isVideoDurationValid('' + duration)) { 84 if (!isVideoDurationValid('' + duration)) {
85 return res.status(400) 85 return res.status(400)
diff --git a/server/models/video/video-interface.ts b/server/models/video/video-interface.ts
index 4b5ae08c2..dd457bb00 100644
--- a/server/models/video/video-interface.ts
+++ b/server/models/video/video-interface.ts
@@ -1,7 +1,6 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird' 2import * as Promise from 'bluebird'
3 3
4import { AuthorInstance } from './author-interface'
5import { TagAttributes, TagInstance } from './tag-interface' 4import { TagAttributes, TagInstance } from './tag-interface'
6import { VideoFileAttributes, VideoFileInstance } from './video-file-interface' 5import { VideoFileAttributes, VideoFileInstance } from './video-file-interface'
7 6
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index b99b5eda8..b46b90c14 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -1,7 +1,6 @@
1/* tslint:disable:no-unused-expression */ 1/* tslint:disable:no-unused-expression */
2 2
3import * as request from 'supertest' 3import * as request from 'supertest'
4import { join } from 'path'
5import 'mocha' 4import 'mocha'
6import * as chai from 'chai' 5import * as chai from 'chai'
7const expect = chai.expect 6const expect = chai.expect
diff --git a/server/tests/api/video-channels.ts b/server/tests/api/video-channels.ts
index 95b202e2f..601b527ef 100644
--- a/server/tests/api/video-channels.ts
+++ b/server/tests/api/video-channels.ts
@@ -1,7 +1,5 @@
1/* tslint:disable:no-unused-expression */ 1/* tslint:disable:no-unused-expression */
2 2
3import { keyBy } from 'lodash'
4import { join } from 'path'
5import 'mocha' 3import 'mocha'
6import * as chai from 'chai' 4import * as chai from 'chai'
7const expect = chai.expect 5const expect = chai.expect