diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 18:36:49 +0200 |
commit | 556ddc319242aafef51bae9301423ecf8701a3af (patch) | |
tree | 413829b522193584df348f0356a702b3222c3419 /server/models/video | |
parent | d15ab38a905e6b50972e6f884917db9198279daf (diff) | |
download | PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.gz PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.tar.zst PeerTube-556ddc319242aafef51bae9301423ecf8701a3af.zip |
Upgrade common server dependencies
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-interface.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video-interface.ts b/server/models/video/video-interface.ts index cc214fd60..fb31c6a8f 100644 --- a/server/models/video/video-interface.ts +++ b/server/models/video/video-interface.ts | |||
@@ -121,6 +121,7 @@ export interface VideoClass { | |||
121 | } | 121 | } |
122 | 122 | ||
123 | export interface VideoAttributes { | 123 | export interface VideoAttributes { |
124 | id?: number | ||
124 | uuid?: string | 125 | uuid?: string |
125 | name: string | 126 | name: string |
126 | category: number | 127 | category: number |
@@ -140,7 +141,6 @@ export interface VideoAttributes { | |||
140 | } | 141 | } |
141 | 142 | ||
142 | export interface VideoInstance extends VideoClass, VideoAttributes, Sequelize.Instance<VideoAttributes> { | 143 | export interface VideoInstance extends VideoClass, VideoAttributes, Sequelize.Instance<VideoAttributes> { |
143 | id: number | ||
144 | createdAt: Date | 144 | createdAt: Date |
145 | updatedAt: Date | 145 | updatedAt: Date |
146 | 146 | ||
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index b3ca1e668..7dfea8ac9 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -643,7 +643,7 @@ list = function () { | |||
643 | } | 643 | } |
644 | 644 | ||
645 | listForApi = function (start: number, count: number, sort: string) { | 645 | listForApi = function (start: number, count: number, sort: string) { |
646 | // Exclude Blakclisted videos from the list | 646 | // Exclude blacklisted videos from the list |
647 | const query = { | 647 | const query = { |
648 | distinct: true, | 648 | distinct: true, |
649 | offset: start, | 649 | offset: start, |
@@ -807,7 +807,7 @@ searchAndPopulateAuthorAndPodAndTags = function (value: string, field: string, s | |||
807 | model: Video['sequelize'].models.VideoFile | 807 | model: Video['sequelize'].models.VideoFile |
808 | } | 808 | } |
809 | 809 | ||
810 | const query: Sequelize.FindOptions = { | 810 | const query: Sequelize.FindOptions<VideoAttributes> = { |
811 | distinct: true, | 811 | distinct: true, |
812 | where: createBaseVideosWhere(), | 812 | where: createBaseVideosWhere(), |
813 | offset: start, | 813 | offset: start, |