diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/initializers/migrations/0345-video-playlists.ts | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip |
Move config in its own file
Diffstat (limited to 'server/initializers/migrations/0345-video-playlists.ts')
-rw-r--r-- | server/initializers/migrations/0345-video-playlists.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/migrations/0345-video-playlists.ts b/server/initializers/migrations/0345-video-playlists.ts index 11670b11d..6953f5553 100644 --- a/server/initializers/migrations/0345-video-playlists.ts +++ b/server/initializers/migrations/0345-video-playlists.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { CONFIG } from '../constants' | ||
3 | import { VideoPlaylistPrivacy, VideoPlaylistType } from '../../../shared/models/videos' | 2 | import { VideoPlaylistPrivacy, VideoPlaylistType } from '../../../shared/models/videos' |
4 | import * as uuidv4 from 'uuid/v4' | 3 | import * as uuidv4 from 'uuid/v4' |
4 | import { WEBSERVER } from '../constants' | ||
5 | 5 | ||
6 | async function up (utils: { | 6 | async function up (utils: { |
7 | transaction: Sequelize.Transaction, | 7 | transaction: Sequelize.Transaction, |
@@ -57,7 +57,7 @@ CREATE TABLE IF NOT EXISTS "videoPlaylistElement" | |||
57 | for (const username of usernames) { | 57 | for (const username of usernames) { |
58 | const uuid = uuidv4() | 58 | const uuid = uuidv4() |
59 | 59 | ||
60 | const baseUrl = CONFIG.WEBSERVER.URL + '/video-playlists/' + uuid | 60 | const baseUrl = WEBSERVER.URL + '/video-playlists/' + uuid |
61 | const query = ` | 61 | const query = ` |
62 | INSERT INTO "videoPlaylist" ("url", "uuid", "name", "privacy", "type", "ownerAccountId", "createdAt", "updatedAt") | 62 | INSERT INTO "videoPlaylist" ("url", "uuid", "name", "privacy", "type", "ownerAccountId", "createdAt", "updatedAt") |
63 | SELECT '${baseUrl}' AS "url", | 63 | SELECT '${baseUrl}' AS "url", |