// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 15
+const LAST_MIGRATION_VERSION = 25
// ---------------------------------------------------------------------------
// Sortable columns per schema
const SORTABLE_COLUMNS = {
- USERS: [ 'id', '-id', 'username', '-username', 'createdAt', '-createdAt' ],
- VIDEO_ABUSES: [ 'id', '-id', 'createdAt', '-createdAt' ],
- VIDEOS: [ 'name', '-name', 'duration', '-duration', 'createdAt', '-createdAt', 'views', '-views' ]
+ USERS: [ 'id', 'username', 'createdAt' ],
+ VIDEO_ABUSES: [ 'id', 'createdAt' ],
+ VIDEOS: [ 'name', 'duration', 'createdAt', 'views', 'likes' ]
}
const OAUTH_LIFETIME = {
}
}
+const VIDEO_RATE_TYPES = {
+ LIKE: 'like',
+ DISLIKE: 'dislike'
+}
+
// ---------------------------------------------------------------------------
// Score a pod has when we create it as a friend
const RETRY_REQUESTS = 5
const REQUEST_ENDPOINTS = {
- VIDEOS: 'videos',
- QADU: 'videos/qadu',
- EVENT: 'videos/events'
+ VIDEOS: 'videos'
}
+
const REQUEST_ENDPOINT_ACTIONS = {}
REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
ADD: 'add',
REPORT_ABUSE: 'report-abuse'
}
+const REQUEST_VIDEO_QADU_ENDPOINT = 'videos/qadu'
+const REQUEST_VIDEO_EVENT_ENDPOINT = 'videos/events'
+
const REQUEST_VIDEO_QADU_TYPES = {
LIKES: 'likes',
DISLIKES: 'dislikes',
REMOTE_SCHEME,
REQUEST_ENDPOINT_ACTIONS,
REQUEST_ENDPOINTS,
+ REQUEST_VIDEO_EVENT_ENDPOINT,
REQUEST_VIDEO_EVENT_TYPES,
+ REQUEST_VIDEO_QADU_ENDPOINT,
REQUEST_VIDEO_QADU_TYPES,
REQUESTS_IN_PARALLEL,
REQUESTS_INTERVAL,
REQUESTS_LIMIT_PER_POD,
REQUESTS_LIMIT_PODS,
- REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
- REQUESTS_VIDEO_QADU_LIMIT_PODS,
REQUESTS_VIDEO_EVENT_LIMIT_PER_POD,
REQUESTS_VIDEO_EVENT_LIMIT_PODS,
+ REQUESTS_VIDEO_QADU_LIMIT_PER_POD,
+ REQUESTS_VIDEO_QADU_LIMIT_PODS,
RETRY_REQUESTS,
SEARCHABLE_COLUMNS,
SIGNATURE_ALGORITHM,
STATIC_MAX_AGE,
STATIC_PATHS,
THUMBNAILS_SIZE,
- USER_ROLES
+ USER_ROLES,
+ VIDEO_RATE_TYPES
}
// ---------------------------------------------------------------------------