1
0
Fork 0
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"],