RequestEndpoint,
RequestVideoEventType,
RequestVideoQaduType,
+ RemoteVideoRequestType,
JobState
} from '../../shared/models'
// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 75
+const LAST_MIGRATION_VERSION = 80
// ---------------------------------------------------------------------------
// Sortable columns per schema
const SORTABLE_COLUMNS = {
+ PODS: [ 'id', 'host', 'score', 'createdAt' ],
USERS: [ 'id', 'username', 'createdAt' ],
VIDEO_ABUSES: [ 'id', 'createdAt' ],
+ VIDEO_CHANNELS: [ 'id', 'name', 'updatedAt', 'createdAt' ],
VIDEOS: [ 'name', 'duration', 'createdAt', 'views', 'likes' ],
BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ]
}
VIDEO_ABUSES: {
REASON: { min: 2, max: 300 } // Length
},
+ VIDEO_CHANNELS: {
+ NAME: { min: 3, max: 50 }, // Length
+ DESCRIPTION: { min: 3, max: 250 } // Length
+ },
VIDEOS: {
NAME: { min: 3, max: 50 }, // Length
DESCRIPTION: { min: 3, max: 250 }, // Length
VIDEOS: 'videos'
}
-const REQUEST_ENDPOINT_ACTIONS: { [ id: string ]: any } = {}
+const REQUEST_ENDPOINT_ACTIONS: {
+ [ id: string ]: {
+ [ id: string ]: RemoteVideoRequestType
+ }
+} = {}
REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] = {
- ADD: 'add',
- UPDATE: 'update',
- REMOVE: 'remove',
+ ADD_VIDEO: 'add-video',
+ UPDATE_VIDEO: 'update-video',
+ REMOVE_VIDEO: 'remove-video',
+ ADD_CHANNEL: 'add-channel',
+ UPDATE_CHANNEL: 'update-channel',
+ REMOVE_CHANNEL: 'remove-channel',
+ ADD_AUTHOR: 'add-author',
+ REMOVE_AUTHOR: 'remove-author',
REPORT_ABUSE: 'report-abuse'
}