diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-21 14:28:06 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-21 14:40:10 +0100 |
commit | 9b39106d5757caf221a88e42e05167a6fac479c6 (patch) | |
tree | ce3ac7907135d82ad13abf648eff4f963448227e /server/models/video/video-channel.ts | |
parent | 374c1db98cf22527f5b362c70d3c50e3be4c8885 (diff) | |
download | PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.tar.gz PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.tar.zst PeerTube-9b39106d5757caf221a88e42e05167a6fac479c6.zip |
findById -> findByPk
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 91dd0440c..2426b3de6 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -320,7 +320,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
320 | static loadByIdAndPopulateAccount (id: number) { | 320 | static loadByIdAndPopulateAccount (id: number) { |
321 | return VideoChannelModel.unscoped() | 321 | return VideoChannelModel.unscoped() |
322 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ]) | 322 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ]) |
323 | .findById(id) | 323 | .findByPk(id) |
324 | } | 324 | } |
325 | 325 | ||
326 | static loadByIdAndAccount (id: number, accountId: number) { | 326 | static loadByIdAndAccount (id: number, accountId: number) { |
@@ -339,7 +339,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
339 | static loadAndPopulateAccount (id: number) { | 339 | static loadAndPopulateAccount (id: number) { |
340 | return VideoChannelModel.unscoped() | 340 | return VideoChannelModel.unscoped() |
341 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ]) | 341 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT ]) |
342 | .findById(id) | 342 | .findByPk(id) |
343 | } | 343 | } |
344 | 344 | ||
345 | static loadByUUIDAndPopulateAccount (uuid: string) { | 345 | static loadByUUIDAndPopulateAccount (uuid: string) { |
@@ -439,7 +439,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
439 | 439 | ||
440 | return VideoChannelModel.unscoped() | 440 | return VideoChannelModel.unscoped() |
441 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT, ScopeNames.WITH_VIDEOS ]) | 441 | .scope([ ScopeNames.WITH_ACTOR, ScopeNames.WITH_ACCOUNT, ScopeNames.WITH_VIDEOS ]) |
442 | .findById(id, options) | 442 | .findByPk(id, options) |
443 | } | 443 | } |
444 | 444 | ||
445 | toFormattedJSON (): VideoChannel { | 445 | toFormattedJSON (): VideoChannel { |