diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-22 10:46:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-22 10:46:54 +0200 |
commit | d636ab58d042494ef9d17b2d9c4c841bae01c897 (patch) | |
tree | c199a0b346ca20f6891495a9b312a3009da9eb30 /server/models | |
parent | 5c5e587307a27e173333789b5b5167d35f468b01 (diff) | |
download | PeerTube-d636ab58d042494ef9d17b2d9c4c841bae01c897.tar.gz PeerTube-d636ab58d042494ef9d17b2d9c4c841bae01c897.tar.zst PeerTube-d636ab58d042494ef9d17b2d9c4c841bae01c897.zip |
Fix html tag with blacklisted video
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index ab7b49f1e..6a95f6ef7 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -135,6 +135,7 @@ import { | |||
135 | MVideoFullLight, | 135 | MVideoFullLight, |
136 | MVideoIdThumbnail, | 136 | MVideoIdThumbnail, |
137 | MVideoThumbnail, | 137 | MVideoThumbnail, |
138 | MVideoThumbnailBlacklist, | ||
138 | MVideoWithAllFiles, | 139 | MVideoWithAllFiles, |
139 | MVideoWithFile, | 140 | MVideoWithFile, |
140 | MVideoWithRights | 141 | MVideoWithRights |
@@ -1409,6 +1410,19 @@ export class VideoModel extends Model<VideoModel> { | |||
1409 | return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(options) | 1410 | return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(options) |
1410 | } | 1411 | } |
1411 | 1412 | ||
1413 | static loadWithBlacklist (id: number | string, t?: Transaction): Bluebird<MVideoThumbnailBlacklist> { | ||
1414 | const where = buildWhereIdOrUUID(id) | ||
1415 | const options = { | ||
1416 | where, | ||
1417 | transaction: t | ||
1418 | } | ||
1419 | |||
1420 | return VideoModel.scope([ | ||
1421 | ScopeNames.WITH_THUMBNAILS, | ||
1422 | ScopeNames.WITH_BLACKLISTED | ||
1423 | ]).findOne(options) | ||
1424 | } | ||
1425 | |||
1412 | static loadWithRights (id: number | string, t?: Transaction): Bluebird<MVideoWithRights> { | 1426 | static loadWithRights (id: number | string, t?: Transaction): Bluebird<MVideoWithRights> { |
1413 | const where = buildWhereIdOrUUID(id) | 1427 | const where = buildWhereIdOrUUID(id) |
1414 | const options = { | 1428 | const options = { |