aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index b627595c9..081b21f2d 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -1,4 +1,4 @@
1import { FindOptions, Includeable, literal, Op, QueryTypes, ScopeOptions } from 'sequelize' 1import { FindOptions, Includeable, literal, Op, QueryTypes, ScopeOptions, Transaction } from 'sequelize'
2import { 2import {
3 AllowNull, 3 AllowNull,
4 BeforeDestroy, 4 BeforeDestroy,
@@ -17,6 +17,7 @@ import {
17 Table, 17 Table,
18 UpdatedAt 18 UpdatedAt
19} from 'sequelize-typescript' 19} from 'sequelize-typescript'
20import { setAsUpdated } from '@server/helpers/database-utils'
20import { MAccountActor } from '@server/types/models' 21import { MAccountActor } from '@server/types/models'
21import { ActivityPubActor } from '../../../shared/models/activitypub' 22import { ActivityPubActor } from '../../../shared/models/activitypub'
22import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' 23import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos'
@@ -653,6 +654,7 @@ ON "Account->Actor"."serverId" = "Account->Actor->Server"."id"`
653 description: this.description, 654 description: this.description,
654 support: this.support, 655 support: this.support,
655 isLocal: this.Actor.isOwned(), 656 isLocal: this.Actor.isOwned(),
657 updatedAt: this.updatedAt,
656 ownerAccount: undefined, 658 ownerAccount: undefined,
657 videosCount, 659 videosCount,
658 viewsPerDay 660 viewsPerDay
@@ -689,4 +691,8 @@ ON "Account->Actor"."serverId" = "Account->Actor->Server"."id"`
689 isOutdated () { 691 isOutdated () {
690 return this.Actor.isOutdated() 692 return this.Actor.isOutdated()
691 } 693 }
694
695 setAsUpdated (transaction: Transaction) {
696 return setAsUpdated('videoChannel', this.id, transaction)
697 }
692} 698}