aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-comment.ts5
-rw-r--r--server/models/video/video.ts4
2 files changed, 7 insertions, 2 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index ba09522cc..cf2a80d53 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -144,6 +144,11 @@ enum ScopeNames {
144 }, 144 },
145 { 145 {
146 fields: [ 'accountId' ] 146 fields: [ 'accountId' ]
147 },
148 {
149 fields: [
150 { name: 'createdAt', order: 'DESC' }
151 ]
147 } 152 }
148 ] 153 ]
149}) 154})
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 02a4c851c..344bfc929 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -23,7 +23,7 @@ import {
23 Table, 23 Table,
24 UpdatedAt 24 UpdatedAt
25} from 'sequelize-typescript' 25} from 'sequelize-typescript'
26import { UserRight, VideoPrivacy, VideoState } from '../../../shared' 26import { UserRight, VideoPrivacy, VideoState, ResultList } from '../../../shared'
27import { VideoTorrentObject } from '../../../shared/models/activitypub/objects' 27import { VideoTorrentObject } from '../../../shared/models/activitypub/objects'
28import { Video, VideoDetails } from '../../../shared/models/videos' 28import { Video, VideoDetails } from '../../../shared/models/videos'
29import { VideoFilter } from '../../../shared/models/videos/video-query.type' 29import { VideoFilter } from '../../../shared/models/videos/video-query.type'
@@ -1442,7 +1442,7 @@ export class VideoModel extends Model<VideoModel> {
1442 private static async getAvailableForApi ( 1442 private static async getAvailableForApi (
1443 options: BuildVideosQueryOptions, 1443 options: BuildVideosQueryOptions,
1444 countVideos = true 1444 countVideos = true
1445 ) { 1445 ): Promise<ResultList<VideoModel>> {
1446 function getCount () { 1446 function getCount () {
1447 if (countVideos !== true) return Promise.resolve(undefined) 1447 if (countVideos !== true) return Promise.resolve(undefined)
1448 1448