diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-17 11:28:11 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-17 11:28:11 +0200 |
commit | 154898b0b7bc1af41fc5a94974e338a3590c90f3 (patch) | |
tree | 5fb90f66da7587aed53c99ac1884c7acd0c1f7ca /shared | |
parent | df98563e2104b82b119c00a3cd83cd0dc1242d25 (diff) | |
download | PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.gz PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.zst PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.zip |
Share models between server and client
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/client-local.model.ts | 4 | ||||
-rw-r--r-- | shared/models/index.ts | 2 | ||||
-rw-r--r-- | shared/models/server-config.model.ts | 5 | ||||
-rw-r--r-- | shared/models/user-video-rate.model.ts | 6 | ||||
-rw-r--r-- | shared/models/video-abuse.model.ts | 2 |
5 files changed, 18 insertions, 1 deletions
diff --git a/shared/models/client-local.model.ts b/shared/models/client-local.model.ts new file mode 100644 index 000000000..c27963e88 --- /dev/null +++ b/shared/models/client-local.model.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export interface ClientLocal { | ||
2 | client_id: string | ||
3 | client_secret: string | ||
4 | } | ||
diff --git a/shared/models/index.ts b/shared/models/index.ts index 1ddc8545f..fffac795e 100644 --- a/shared/models/index.ts +++ b/shared/models/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './client-local.model' | ||
1 | export * from './job.model' | 2 | export * from './job.model' |
2 | export * from './pod.model' | 3 | export * from './pod.model' |
3 | export * from './request-scheduler.model' | 4 | export * from './request-scheduler.model' |
@@ -6,3 +7,4 @@ export * from './user.model' | |||
6 | export * from './video-abuse.model' | 7 | export * from './video-abuse.model' |
7 | export * from './video-blacklist.model' | 8 | export * from './video-blacklist.model' |
8 | export * from './video.model' | 9 | export * from './video.model' |
10 | export * from './server-config.model' | ||
diff --git a/shared/models/server-config.model.ts b/shared/models/server-config.model.ts new file mode 100644 index 000000000..a39156963 --- /dev/null +++ b/shared/models/server-config.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export interface ServerConfig { | ||
2 | signup: { | ||
3 | enabled: boolean | ||
4 | } | ||
5 | } | ||
diff --git a/shared/models/user-video-rate.model.ts b/shared/models/user-video-rate.model.ts index d48774a4b..b770f4073 100644 --- a/shared/models/user-video-rate.model.ts +++ b/shared/models/user-video-rate.model.ts | |||
@@ -1 +1,7 @@ | |||
1 | export type VideoRateType = 'like' | 'dislike' | 1 | export type VideoRateType = 'like' | 'dislike' |
2 | export type UserVideoRateType = 'like' | 'dislike' | 'none' | ||
3 | |||
4 | export interface UserVideoRate { | ||
5 | videoId: string | ||
6 | rating: UserVideoRateType | ||
7 | } | ||
diff --git a/shared/models/video-abuse.model.ts b/shared/models/video-abuse.model.ts index e005a1fd5..72e32cbc7 100644 --- a/shared/models/video-abuse.model.ts +++ b/shared/models/video-abuse.model.ts | |||
@@ -3,6 +3,6 @@ export interface VideoAbuse { | |||
3 | reporterPodHost: string | 3 | reporterPodHost: string |
4 | reason: string | 4 | reason: string |
5 | reporterUsername: string | 5 | reporterUsername: string |
6 | videoId: number | 6 | videoId: string |
7 | createdAt: Date | 7 | createdAt: Date |
8 | } | 8 | } |