1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add comments controller

This commit is contained in:
Chocobozzz 2017-12-22 10:50:07 +01:00
parent 6d85247028
commit bf1f650817
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 464 additions and 99 deletions

View file

@ -0,0 +1,16 @@
import 'express-validator'
import 'multer'
import * as validator from 'validator'
import { CONSTRAINTS_FIELDS } from '../../initializers'
const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
function isValidVideoCommentText (value: string) {
return value === null || validator.isLength(value, VIDEO_COMMENTS_CONSTRAINTS_FIELDS.TEXT)
}
// ---------------------------------------------------------------------------
export {
isValidVideoCommentText
}