diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-25 16:52:01 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-26 09:11:38 +0200 |
commit | d412e80e5f748f92118541a5334c14ebd4a90881 (patch) | |
tree | 3f0a240fadc0cf1f63ef087515b2e2cd253a6b79 /server | |
parent | 404b54e14f6623c1644a8c87ca22f4bab98d5484 (diff) | |
download | PeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.tar.gz PeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.tar.zst PeerTube-d412e80e5f748f92118541a5334c14ebd4a90881.zip |
Fix lint
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/users.ts | 2 | ||||
-rw-r--r-- | server/controllers/api/videos/index.ts | 2 | ||||
-rw-r--r-- | server/helpers/peertube-crypto.ts | 4 | ||||
-rw-r--r-- | server/initializers/database.ts | 2 | ||||
-rw-r--r-- | server/lib/request/abstract-request-scheduler.ts | 2 | ||||
-rw-r--r-- | server/lib/request/request-video-qadu-scheduler.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-interface.ts | 1 | ||||
-rw-r--r-- | server/tests/api/check-params/video-channels.ts | 1 | ||||
-rw-r--r-- | server/tests/api/video-channels.ts | 2 |
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 | ||
202 | async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) { | 202 | async 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' |
44 | import { TagInstance, VideoInstance } from '../../../models' | 44 | import { VideoInstance } from '../../../models' |
45 | import { VideoCreate, VideoUpdate } from '../../../../shared' | 45 | import { VideoCreate, VideoUpdate } from '../../../../shared' |
46 | 46 | ||
47 | import { abuseVideoRouter } from './abuse' | 47 | import { 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 | ||
64 | function comparePassword (plainPassword: string, hashPassword: string) { | 64 | function comparePassword (plainPassword: string, hashPassword: string) { |
@@ -68,7 +68,7 @@ function comparePassword (plainPassword: string, hashPassword: string) { | |||
68 | async function createCertsIfNotExist () { | 68 | async 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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | 2 | import * as Promise from 'bluebird' |
3 | 3 | ||
4 | import { AuthorInstance } from './author-interface' | ||
5 | import { TagAttributes, TagInstance } from './tag-interface' | 4 | import { TagAttributes, TagInstance } from './tag-interface' |
6 | import { VideoFileAttributes, VideoFileInstance } from './video-file-interface' | 5 | import { 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 | ||
3 | import * as request from 'supertest' | 3 | import * as request from 'supertest' |
4 | import { join } from 'path' | ||
5 | import 'mocha' | 4 | import 'mocha' |
6 | import * as chai from 'chai' | 5 | import * as chai from 'chai' |
7 | const expect = chai.expect | 6 | const 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 | ||
3 | import { keyBy } from 'lodash' | ||
4 | import { join } from 'path' | ||
5 | import 'mocha' | 3 | import 'mocha' |
6 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
7 | const expect = chai.expect | 5 | const expect = chai.expect |