This commit is contained in:
Chocobozzz 2017-10-25 16:52:01 +02:00
parent 404b54e14f
commit d412e80e5f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
11 changed files with 9 additions and 12 deletions

View File

@ -196,7 +196,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
await user.save()
return await res.sendStatus(204)
return res.sendStatus(204)
}
async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) {

View File

@ -41,7 +41,7 @@ import {
getVideoFileHeight,
resetSequelizeInstance
} from '../../../helpers'
import { TagInstance, VideoInstance } from '../../../models'
import { VideoInstance } from '../../../models'
import { VideoCreate, VideoUpdate } from '../../../../shared'
import { abuseVideoRouter } from './abuse'

View File

@ -58,7 +58,7 @@ async function sign (data: string|Object) {
sign.update(dataString, 'utf8')
const myKey = await getMyPrivateCert()
return await sign.sign(myKey, SIGNATURE_ENCODING)
return sign.sign(myKey, SIGNATURE_ENCODING)
}
function comparePassword (plainPassword: string, hashPassword: string) {
@ -68,7 +68,7 @@ function comparePassword (plainPassword: string, hashPassword: string) {
async function createCertsIfNotExist () {
const exist = await certsExist()
if (exist === true) {
return undefined
return
}
return await createCerts()

View File

@ -96,7 +96,7 @@ database.init = async (silent: boolean) => {
if (!silent) logger.info('Database %s is ready.', dbname)
return undefined
return
}
// ---------------------------------------------------------------------------

View File

@ -146,7 +146,7 @@ abstract class AbstractRequestScheduler <T> {
this.afterRequestsHook()
// All the requests were made, we update the pods score
await db.Pod.updatePodsScore(goodPods, badPods)
db.Pod.updatePodsScore(goodPods, badPods)
}
protected afterRequestHook () {

View File

@ -95,7 +95,7 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa
default:
logger.error('Unknown request video QADU type %s.', request.type)
return
return undefined
}
// Do not forget the uuid so the remote pod can identify the video

View File

@ -79,7 +79,7 @@ const videosAddValidator = [
})
.then(duration => {
// Previous test failed, abort
if (duration === undefined) return
if (duration === undefined) return undefined
if (!isVideoDurationValid('' + duration)) {
return res.status(400)

View File

@ -1,7 +1,6 @@
import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'
import { AuthorInstance } from './author-interface'
import { TagAttributes, TagInstance } from './tag-interface'
import { VideoFileAttributes, VideoFileInstance } from './video-file-interface'

View File

@ -1,7 +1,6 @@
/* tslint:disable:no-unused-expression */
import * as request from 'supertest'
import { join } from 'path'
import 'mocha'
import * as chai from 'chai'
const expect = chai.expect

View File

@ -1,7 +1,5 @@
/* tslint:disable:no-unused-expression */
import { keyBy } from 'lodash'
import { join } from 'path'
import 'mocha'
import * as chai from 'chai'
const expect = chai.expect

View File

@ -1,6 +1,7 @@
{
"extends": "tslint-config-standard",
"rules": {
"await-promise": [true, "Bluebird"],
"no-inferrable-types": true,
"eofline": true,
"indent": ["spaces"],