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() await user.save()
return await res.sendStatus(204) return res.sendStatus(204)
} }
async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) { async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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