aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-06 15:36:44 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit830b4faff15fb9c81d88e8e69fcdf94aad32bef8 (patch)
tree53de6c9e30ce88734b4bdda62016e0498fe78491 /shared
parentd4c9f45b31eda0b7a391ddc83eb290ca5cba311f (diff)
downloadPeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.gz
PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.zst
PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.zip
Add/update/delete/list my playlists
Diffstat (limited to 'shared')
-rw-r--r--shared/models/videos/index.ts9
-rw-r--r--shared/models/videos/playlist/video-playlist.model.ts2
-rw-r--r--shared/utils/videos/video-playlists.ts12
3 files changed, 21 insertions, 2 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index 056ae06da..9cf861048 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -11,6 +11,13 @@ export * from './blacklist/video-blacklist-update.model'
11export * from './channel/video-channel-create.model' 11export * from './channel/video-channel-create.model'
12export * from './channel/video-channel-update.model' 12export * from './channel/video-channel-update.model'
13export * from './channel/video-channel.model' 13export * from './channel/video-channel.model'
14export * from './playlist/video-playlist-create.model'
15export * from './playlist/video-playlist-element-create.model'
16export * from './playlist/video-playlist-element-update.model'
17export * from './playlist/video-playlist-privacy.model'
18export * from './playlist/video-playlist-type.model'
19export * from './playlist/video-playlist-update.model'
20export * from './playlist/video-playlist.model'
14export * from './video-change-ownership.model' 21export * from './video-change-ownership.model'
15export * from './video-change-ownership-create.model' 22export * from './video-change-ownership-create.model'
16export * from './video-create.model' 23export * from './video-create.model'
@@ -27,4 +34,4 @@ export * from './caption/video-caption-update.model'
27export * from './import/video-import-create.model' 34export * from './import/video-import-create.model'
28export * from './import/video-import-state.enum' 35export * from './import/video-import-state.enum'
29export * from './import/video-import.model' 36export * from './import/video-import.model'
30export { VideoConstant } from './video-constant.model' 37export * from './video-constant.model'
diff --git a/shared/models/videos/playlist/video-playlist.model.ts b/shared/models/videos/playlist/video-playlist.model.ts
index 7fec0e42b..c0941727a 100644
--- a/shared/models/videos/playlist/video-playlist.model.ts
+++ b/shared/models/videos/playlist/video-playlist.model.ts
@@ -21,6 +21,6 @@ export interface VideoPlaylist {
21 createdAt: Date | string 21 createdAt: Date | string
22 updatedAt: Date | string 22 updatedAt: Date | string
23 23
24 ownerAccount?: AccountSummary 24 ownerAccount: AccountSummary
25 videoChannel?: VideoChannelSummary 25 videoChannel?: VideoChannelSummary
26} 26}
diff --git a/shared/utils/videos/video-playlists.ts b/shared/utils/videos/video-playlists.ts
index 4af52ec0f..b84b21623 100644
--- a/shared/utils/videos/video-playlists.ts
+++ b/shared/utils/videos/video-playlists.ts
@@ -265,9 +265,21 @@ async function checkPlaylistFilesWereRemoved (
265 } 265 }
266} 266}
267 267
268function getVideoPlaylistPrivacies (url: string) {
269 const path = '/api/v1/video-playlists/privacies'
270
271 return makeGetRequest({
272 url,
273 path,
274 statusCodeExpected: 200
275 })
276}
277
268// --------------------------------------------------------------------------- 278// ---------------------------------------------------------------------------
269 279
270export { 280export {
281 getVideoPlaylistPrivacies,
282
271 getVideoPlaylistsList, 283 getVideoPlaylistsList,
272 getVideoChannelPlaylistsList, 284 getVideoChannelPlaylistsList,
273 getAccountPlaylistsList, 285 getAccountPlaylistsList,