diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-03 14:30:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-03 16:40:32 +0200 |
commit | 49af5ac8c2653cb0ef23479c9d3256c5b724d49d (patch) | |
tree | 6783df1833b13e141cfd5dc0177531887c4a4e2e /server/models/video | |
parent | 9777fe9eebe53debdf45091cab98f72a5987e05a (diff) | |
download | PeerTube-49af5ac8c2653cb0ef23479c9d3256c5b724d49d.tar.gz PeerTube-49af5ac8c2653cb0ef23479c9d3256c5b724d49d.tar.zst PeerTube-49af5ac8c2653cb0ef23479c9d3256c5b724d49d.zip |
Refactor AP playlists
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-playlist.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index 98cea1b64..1a05f8d42 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts | |||
@@ -18,6 +18,7 @@ import { | |||
18 | UpdatedAt | 18 | UpdatedAt |
19 | } from 'sequelize-typescript' | 19 | } from 'sequelize-typescript' |
20 | import { v4 as uuidv4 } from 'uuid' | 20 | import { v4 as uuidv4 } from 'uuid' |
21 | import { setAsUpdated } from '@server/helpers/database-utils' | ||
21 | import { MAccountId, MChannelId } from '@server/types/models' | 22 | import { MAccountId, MChannelId } from '@server/types/models' |
22 | import { AttributesOnly } from '@shared/core-utils' | 23 | import { AttributesOnly } from '@shared/core-utils' |
23 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' | 24 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' |
@@ -531,9 +532,7 @@ export class VideoPlaylistModel extends Model<Partial<AttributesOnly<VideoPlayli | |||
531 | } | 532 | } |
532 | 533 | ||
533 | setAsRefreshed () { | 534 | setAsRefreshed () { |
534 | this.changed('updatedAt', true) | 535 | return setAsUpdated('videoPlaylist', this.id) |
535 | |||
536 | return this.save() | ||
537 | } | 536 | } |
538 | 537 | ||
539 | isOwned () { | 538 | isOwned () { |