diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-22 09:14:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-22 09:14:50 +0100 |
commit | 6d8524702874120a4667269a81a61e3c7c5e300d (patch) | |
tree | a462d95c56b558a4cfc42db08ec1cb66b1f99680 /server/models/video/video.ts | |
parent | fb4fd623d5e5adcfdc9ecf3dffef702b3786f486 (diff) | |
download | PeerTube-6d8524702874120a4667269a81a61e3c7c5e300d.tar.gz PeerTube-6d8524702874120a4667269a81a61e3c7c5e300d.tar.zst PeerTube-6d8524702874120a4667269a81a61e3c7c5e300d.zip |
Create comment on replied mastodon statutes
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 8c49bc3af..b6a2ce6b5 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -491,6 +491,18 @@ export class VideoModel extends Model<VideoModel> { | |||
491 | return VideoModel.findById(id) | 491 | return VideoModel.findById(id) |
492 | } | 492 | } |
493 | 493 | ||
494 | static loadByUrl (url: string, t?: Sequelize.Transaction) { | ||
495 | const query: IFindOptions<VideoModel> = { | ||
496 | where: { | ||
497 | url | ||
498 | } | ||
499 | } | ||
500 | |||
501 | if (t !== undefined) query.transaction = t | ||
502 | |||
503 | return VideoModel.findOne(query) | ||
504 | } | ||
505 | |||
494 | static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { | 506 | static loadByUrlAndPopulateAccount (url: string, t?: Sequelize.Transaction) { |
495 | const query: IFindOptions<VideoModel> = { | 507 | const query: IFindOptions<VideoModel> = { |
496 | where: { | 508 | where: { |