aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-28 17:30:59 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-29 14:56:35 +0200
commitd4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb (patch)
treea4cb07318100031951c3dffc61f4f2cb95d2cbd0 /shared/models
parent62ddc31a9e4b92d7d27898ccfc363f68ab044139 (diff)
downloadPeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.gz
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.zst
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.zip
Support short uuid for GET video/playlist
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/common/index.ts1
-rw-r--r--shared/models/common/result-list.model.ts (renamed from shared/models/result-list.model.ts)0
-rw-r--r--shared/models/index.ts14
-rw-r--r--shared/models/moderation/abuse/abuse-create.model.ts2
-rw-r--r--shared/models/tokens/index.ts1
-rw-r--r--shared/models/tokens/oauth-client-local.model.ts (renamed from shared/models/oauth-client-local.model.ts)0
-rw-r--r--shared/models/videos/index.ts1
-rw-r--r--shared/models/videos/playlist/index.ts1
-rw-r--r--shared/models/videos/playlist/video-playlist-create-result.model.ts5
-rw-r--r--shared/models/videos/playlist/video-playlist.model.ts2
-rw-r--r--shared/models/videos/video-create-result.model.ts5
-rw-r--r--shared/models/videos/video.model.ts2
12 files changed, 26 insertions, 8 deletions
diff --git a/shared/models/common/index.ts b/shared/models/common/index.ts
new file mode 100644
index 000000000..4db85eff2
--- /dev/null
+++ b/shared/models/common/index.ts
@@ -0,0 +1 @@
export * from './result-list.model'
diff --git a/shared/models/result-list.model.ts b/shared/models/common/result-list.model.ts
index fcafcfb2f..fcafcfb2f 100644
--- a/shared/models/result-list.model.ts
+++ b/shared/models/common/result-list.model.ts
diff --git a/shared/models/index.ts b/shared/models/index.ts
index 4db1f234e..5c2bc480e 100644
--- a/shared/models/index.ts
+++ b/shared/models/index.ts
@@ -1,16 +1,16 @@
1export * from './activitypub' 1export * from './activitypub'
2export * from './actors' 2export * from './actors'
3export * from './moderation'
4export * from './custom-markup'
5export * from './bulk' 3export * from './bulk'
6export * from './redundancy' 4export * from './common'
7export * from './users' 5export * from './custom-markup'
8export * from './videos'
9export * from './feeds' 6export * from './feeds'
10export * from './joinpeertube' 7export * from './joinpeertube'
8export * from './moderation'
11export * from './overviews' 9export * from './overviews'
12export * from './plugins' 10export * from './plugins'
11export * from './redundancy'
13export * from './search' 12export * from './search'
14export * from './server' 13export * from './server'
15export * from './oauth-client-local.model' 14export * from './tokens'
16export * from './result-list.model' 15export * from './users'
16export * from './videos'
diff --git a/shared/models/moderation/abuse/abuse-create.model.ts b/shared/models/moderation/abuse/abuse-create.model.ts
index 0e7e9587f..7d35555c3 100644
--- a/shared/models/moderation/abuse/abuse-create.model.ts
+++ b/shared/models/moderation/abuse/abuse-create.model.ts
@@ -10,7 +10,7 @@ export interface AbuseCreate {
10 } 10 }
11 11
12 video?: { 12 video?: {
13 id: number 13 id: number | string
14 startAt?: number 14 startAt?: number
15 endAt?: number 15 endAt?: number
16 } 16 }
diff --git a/shared/models/tokens/index.ts b/shared/models/tokens/index.ts
new file mode 100644
index 000000000..fe130f153
--- /dev/null
+++ b/shared/models/tokens/index.ts
@@ -0,0 +1 @@
export * from './oauth-client-local.model'
diff --git a/shared/models/oauth-client-local.model.ts b/shared/models/tokens/oauth-client-local.model.ts
index 0c6ce6c5d..0c6ce6c5d 100644
--- a/shared/models/oauth-client-local.model.ts
+++ b/shared/models/tokens/oauth-client-local.model.ts
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index 64f2c9df6..faa9b9868 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -35,3 +35,4 @@ export * from './video-transcoding-fps.model'
35 35
36export * from './video-update.model' 36export * from './video-update.model'
37export * from './video.model' 37export * from './video.model'
38export * from './video-create-result.model'
diff --git a/shared/models/videos/playlist/index.ts b/shared/models/videos/playlist/index.ts
index 99f7e9bab..f11a4bd28 100644
--- a/shared/models/videos/playlist/index.ts
+++ b/shared/models/videos/playlist/index.ts
@@ -1,4 +1,5 @@
1export * from './video-exist-in-playlist.model' 1export * from './video-exist-in-playlist.model'
2export * from './video-playlist-create-result.model'
2export * from './video-playlist-create.model' 3export * from './video-playlist-create.model'
3export * from './video-playlist-element-create.model' 4export * from './video-playlist-element-create.model'
4export * from './video-playlist-element-update.model' 5export * from './video-playlist-element-update.model'
diff --git a/shared/models/videos/playlist/video-playlist-create-result.model.ts b/shared/models/videos/playlist/video-playlist-create-result.model.ts
new file mode 100644
index 000000000..cd9b170ae
--- /dev/null
+++ b/shared/models/videos/playlist/video-playlist-create-result.model.ts
@@ -0,0 +1,5 @@
1export interface VideoPlaylistCreateResult {
2 id: number
3 uuid: string
4 shortUUID: string
5}
diff --git a/shared/models/videos/playlist/video-playlist.model.ts b/shared/models/videos/playlist/video-playlist.model.ts
index ab4171ad1..b8a9955d9 100644
--- a/shared/models/videos/playlist/video-playlist.model.ts
+++ b/shared/models/videos/playlist/video-playlist.model.ts
@@ -6,6 +6,8 @@ import { VideoPlaylistType } from './video-playlist-type.model'
6export interface VideoPlaylist { 6export interface VideoPlaylist {
7 id: number 7 id: number
8 uuid: string 8 uuid: string
9 shortUUID: string
10
9 isLocal: boolean 11 isLocal: boolean
10 12
11 url: string 13 url: string
diff --git a/shared/models/videos/video-create-result.model.ts b/shared/models/videos/video-create-result.model.ts
new file mode 100644
index 000000000..a9f8e25a0
--- /dev/null
+++ b/shared/models/videos/video-create-result.model.ts
@@ -0,0 +1,5 @@
1export interface VideoCreateResult {
2 id: number
3 uuid: string
4 shortUUID: string
5}
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index caefeff82..0e3e89f43 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -10,6 +10,8 @@ import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
10export interface Video { 10export interface Video {
11 id: number 11 id: number
12 uuid: string 12 uuid: string
13 shortUUID: string
14
13 createdAt: Date | string 15 createdAt: Date | string
14 updatedAt: Date | string 16 updatedAt: Date | string
15 publishedAt: Date | string 17 publishedAt: Date | string