diff options
Diffstat (limited to 'server/models/video/video-share.ts')
-rw-r--r-- | server/models/video/video-share.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts index 6f770957f..602cc69b9 100644 --- a/server/models/video/video-share.ts +++ b/server/models/video/video-share.ts | |||
@@ -98,6 +98,15 @@ export class VideoShareModel extends Model<VideoShareModel> { | |||
98 | }) | 98 | }) |
99 | } | 99 | } |
100 | 100 | ||
101 | static loadByUrl (url: string, t: Sequelize.Transaction) { | ||
102 | return VideoShareModel.scope(ScopeNames.WITH_ACTOR).findOne({ | ||
103 | where: { | ||
104 | url | ||
105 | }, | ||
106 | transaction: t | ||
107 | }) | ||
108 | } | ||
109 | |||
101 | static loadActorsByShare (videoId: number, t: Sequelize.Transaction) { | 110 | static loadActorsByShare (videoId: number, t: Sequelize.Transaction) { |
102 | const query = { | 111 | const query = { |
103 | where: { | 112 | where: { |