diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-07 17:14:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-10 09:38:11 +0200 |
commit | e024fd6a7494b37251da1d59470324305cdb4129 (patch) | |
tree | e39b8c4b1bd8ba38936f0657e485358fc10b9050 /server/models/video/video.ts | |
parent | 1e0741d16545ea720d04b566a808853b3975ea7f (diff) | |
download | PeerTube-e024fd6a7494b37251da1d59470324305cdb4129.tar.gz PeerTube-e024fd6a7494b37251da1d59470324305cdb4129.tar.zst PeerTube-e024fd6a7494b37251da1d59470324305cdb4129.zip |
Update channel updatedAt when uploading a video
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index e55a21a6b..8c316e00c 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -24,6 +24,7 @@ import { | |||
24 | Table, | 24 | Table, |
25 | UpdatedAt | 25 | UpdatedAt |
26 | } from 'sequelize-typescript' | 26 | } from 'sequelize-typescript' |
27 | import { setAsUpdated } from '@server/helpers/database-utils' | ||
27 | import { buildNSFWFilter } from '@server/helpers/express-utils' | 28 | import { buildNSFWFilter } from '@server/helpers/express-utils' |
28 | import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' | 29 | import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' |
29 | import { LiveManager } from '@server/lib/live-manager' | 30 | import { LiveManager } from '@server/lib/live-manager' |
@@ -2053,11 +2054,7 @@ export class VideoModel extends Model { | |||
2053 | } | 2054 | } |
2054 | 2055 | ||
2055 | setAsRefreshed () { | 2056 | setAsRefreshed () { |
2056 | const options = { | 2057 | return setAsUpdated('video', this.id) |
2057 | where: { id: this.id } | ||
2058 | } | ||
2059 | |||
2060 | return VideoModel.update({ updatedAt: new Date() }, options) | ||
2061 | } | 2058 | } |
2062 | 2059 | ||
2063 | requiresAuth () { | 2060 | requiresAuth () { |