await user.save()
- return await res.sendStatus(204)
+ return res.sendStatus(204)
}
async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) {
getVideoFileHeight,
resetSequelizeInstance
} from '../../../helpers'
-import { TagInstance, VideoInstance } from '../../../models'
+import { VideoInstance } from '../../../models'
import { VideoCreate, VideoUpdate } from '../../../../shared'
import { abuseVideoRouter } from './abuse'
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) {
async function createCertsIfNotExist () {
const exist = await certsExist()
if (exist === true) {
- return undefined
+ return
}
return await createCerts()
if (!silent) logger.info('Database %s is ready.', dbname)
- return undefined
+ return
}
// ---------------------------------------------------------------------------
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 () {
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
})
.then(duration => {
// Previous test failed, abort
- if (duration === undefined) return
+ if (duration === undefined) return undefined
if (!isVideoDurationValid('' + duration)) {
return res.status(400)
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'
/* 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
/* tslint:disable:no-unused-expression */
-import { keyBy } from 'lodash'
-import { join } from 'path'
import 'mocha'
import * as chai from 'chai'
const expect = chai.expect
{
"extends": "tslint-config-standard",
"rules": {
+ "await-promise": [true, "Bluebird"],
"no-inferrable-types": true,
"eofline": true,
"indent": ["spaces"],