diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-05 10:58:44 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa (patch) | |
tree | c4984e854f5dc18e5c27afd73b843bd52c143034 /server/initializers | |
parent | 07b1a18aa678d260009a93e36606c5c5f585723d (diff) | |
download | PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.gz PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.zst PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.zip |
Add playlist rest tests
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 7 | ||||
-rw-r--r-- | server/initializers/installer.ts | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 154a9cffe..59c30fdee 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -11,6 +11,7 @@ import { invert } from 'lodash' | |||
11 | import { CronRepeatOptions, EveryRepeatOptions } from 'bull' | 11 | import { CronRepeatOptions, EveryRepeatOptions } from 'bull' |
12 | import * as bytes from 'bytes' | 12 | import * as bytes from 'bytes' |
13 | import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' | 13 | import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' |
14 | import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' | ||
14 | 15 | ||
15 | // Use a variable to reload the configuration if we need | 16 | // Use a variable to reload the configuration if we need |
16 | let config: IConfig = require('config') | 17 | let config: IConfig = require('config') |
@@ -522,6 +523,11 @@ const VIDEO_PLAYLIST_PRIVACIES = { | |||
522 | [VideoPlaylistPrivacy.PRIVATE]: 'Private' | 523 | [VideoPlaylistPrivacy.PRIVATE]: 'Private' |
523 | } | 524 | } |
524 | 525 | ||
526 | const VIDEO_PLAYLIST_TYPES = { | ||
527 | [VideoPlaylistType.REGULAR]: 'Regular', | ||
528 | [VideoPlaylistType.WATCH_LATER]: 'Watch later' | ||
529 | } | ||
530 | |||
525 | const MIMETYPES = { | 531 | const MIMETYPES = { |
526 | VIDEO: { | 532 | VIDEO: { |
527 | MIMETYPE_EXT: buildVideoMimetypeExt(), | 533 | MIMETYPE_EXT: buildVideoMimetypeExt(), |
@@ -778,6 +784,7 @@ export { | |||
778 | STATIC_MAX_AGE, | 784 | STATIC_MAX_AGE, |
779 | STATIC_PATHS, | 785 | STATIC_PATHS, |
780 | VIDEO_IMPORT_TIMEOUT, | 786 | VIDEO_IMPORT_TIMEOUT, |
787 | VIDEO_PLAYLIST_TYPES, | ||
781 | ACTIVITY_PUB, | 788 | ACTIVITY_PUB, |
782 | ACTIVITY_PUB_ACTOR_TYPES, | 789 | ACTIVITY_PUB_ACTOR_TYPES, |
783 | THUMBNAILS_SIZE, | 790 | THUMBNAILS_SIZE, |
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 2b22e16fe..c669606f8 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as passwordGenerator from 'password-generator' | 1 | import * as passwordGenerator from 'password-generator' |
2 | import { UserRole } from '../../shared' | 2 | import { UserRole } from '../../shared' |
3 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
4 | import { createApplicationActor, createUserAccountAndChannel } from '../lib/user' | 4 | import { createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user' |
5 | import { UserModel } from '../models/account/user' | 5 | import { UserModel } from '../models/account/user' |
6 | import { ApplicationModel } from '../models/application/application' | 6 | import { ApplicationModel } from '../models/application/application' |
7 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 7 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
@@ -141,7 +141,7 @@ async function createOAuthAdminIfNotExist () { | |||
141 | } | 141 | } |
142 | const user = new UserModel(userData) | 142 | const user = new UserModel(userData) |
143 | 143 | ||
144 | await createUserAccountAndChannel(user, validatePassword) | 144 | await createUserAccountAndChannelAndPlaylist(user, validatePassword) |
145 | logger.info('Username: ' + username) | 145 | logger.info('Username: ' + username) |
146 | logger.info('User password: ' + password) | 146 | logger.info('User password: ' + password) |
147 | } | 147 | } |