diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-18 11:28:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-24 16:26:20 +0200 |
commit | 1735c825726edaa0af5035cb6cbb0cc0db502c6d (patch) | |
tree | 7bbb442f2cb4d7be58a4e08d87f5974403a3047c /server/lib/activitypub/playlist.ts | |
parent | e8bafea35bc930cb8ac5b2d521a188642a1adffe (diff) | |
download | PeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.tar.gz PeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.tar.zst PeerTube-1735c825726edaa0af5035cb6cbb0cc0db502c6d.zip |
Update sequelize
Diffstat (limited to 'server/lib/activitypub/playlist.ts')
-rw-r--r-- | server/lib/activitypub/playlist.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/playlist.ts b/server/lib/activitypub/playlist.ts index 341e469f3..721c19603 100644 --- a/server/lib/activitypub/playlist.ts +++ b/server/lib/activitypub/playlist.ts | |||
@@ -14,7 +14,6 @@ import { getOrCreateVideoAndAccountAndChannel } from './videos' | |||
14 | import { isPlaylistElementObjectValid, isPlaylistObjectValid } from '../../helpers/custom-validators/activitypub/playlist' | 14 | import { isPlaylistElementObjectValid, isPlaylistObjectValid } from '../../helpers/custom-validators/activitypub/playlist' |
15 | import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element' | 15 | import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element' |
16 | import { VideoModel } from '../../models/video/video' | 16 | import { VideoModel } from '../../models/video/video' |
17 | import { FilteredModelAttributes } from 'sequelize-typescript/lib/models/Model' | ||
18 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | 17 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' |
19 | import { sequelizeTypescript } from '../../initializers/database' | 18 | import { sequelizeTypescript } from '../../initializers/database' |
20 | import { createPlaylistThumbnailFromUrl } from '../thumbnail' | 19 | import { createPlaylistThumbnailFromUrl } from '../thumbnail' |
@@ -87,7 +86,8 @@ async function createOrUpdateVideoPlaylist (playlistObject: PlaylistObject, byAc | |||
87 | } | 86 | } |
88 | } | 87 | } |
89 | 88 | ||
90 | const [ playlist ] = await VideoPlaylistModel.upsert<VideoPlaylistModel>(playlistAttributes, { returning: true }) | 89 | // FIXME: sequelize typings |
90 | const [ playlist ] = (await VideoPlaylistModel.upsert<VideoPlaylistModel>(playlistAttributes, { returning: true }) as any) | ||
91 | 91 | ||
92 | let accItems: string[] = [] | 92 | let accItems: string[] = [] |
93 | await crawlCollectionPage<string>(playlistObject.id, items => { | 93 | await crawlCollectionPage<string>(playlistObject.id, items => { |
@@ -156,7 +156,7 @@ export { | |||
156 | // --------------------------------------------------------------------------- | 156 | // --------------------------------------------------------------------------- |
157 | 157 | ||
158 | async function resetVideoPlaylistElements (elementUrls: string[], playlist: VideoPlaylistModel) { | 158 | async function resetVideoPlaylistElements (elementUrls: string[], playlist: VideoPlaylistModel) { |
159 | const elementsToCreate: FilteredModelAttributes<VideoPlaylistElementModel>[] = [] | 159 | const elementsToCreate: object[] = [] // FIXME: sequelize typings |
160 | 160 | ||
161 | await Bluebird.map(elementUrls, async elementUrl => { | 161 | await Bluebird.map(elementUrls, async elementUrl => { |
162 | try { | 162 | try { |