// Sortable columns per schema
const SORTABLE_COLUMNS = {
USERS: [ 'username', '-username', 'createdAt', '-createdAt' ],
+ VIDEO_ABUSES: [ 'createdAt', '-createdAt' ],
VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdAt', '-createdAt' ]
}
USERNAME: { min: 3, max: 20 }, // Length
PASSWORD: { min: 6, max: 255 } // Length
},
+ VIDEO_ABUSES: {
+ REASON: { min: 2, max: 300 } // Length
+ },
VIDEOS: {
NAME: { min: 3, max: 50 }, // Length
DESCRIPTION: { min: 3, max: 250 }, // Length
VIDEOS: 'videos'
}
-// ---------------------------------------------------------------------------
-
const REMOTE_SCHEME = {
HTTP: 'https',
WS: 'wss'
}
+// ---------------------------------------------------------------------------
+
+const SIGNATURE_ALGORITHM = 'RSA-SHA256'
+const SIGNATURE_ENCODING = 'hex'
+
// Password encryption
const BCRYPT_SALT_SIZE = 10
+// ---------------------------------------------------------------------------
+
// Express static paths (router)
const STATIC_PATHS = {
PREVIEWS: '/static/previews/',
const THUMBNAILS_SIZE = '200x110'
const PREVIEWS_SIZE = '640x480'
+// ---------------------------------------------------------------------------
+
const USER_ROLES = {
ADMIN: 'admin',
USER: 'user'
REQUESTS_LIMIT,
RETRY_REQUESTS,
SEARCHABLE_COLUMNS,
+ SIGNATURE_ALGORITHM,
+ SIGNATURE_ENCODING,
SORTABLE_COLUMNS,
STATIC_MAX_AGE,
STATIC_PATHS,