aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts21
1 files changed, 1 insertions, 20 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index d73be18d6..b0b261c88 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -72,7 +72,7 @@ type AvailableForListOptions = {
72 attributes: [ 'name', 'description', 'id', 'actorId' ], 72 attributes: [ 'name', 'description', 'id', 'actorId' ],
73 include: [ 73 include: [
74 { 74 {
75 attributes: [ 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ], 75 attributes: [ 'preferredUsername', 'url', 'serverId', 'avatarId' ],
76 model: ActorModel.unscoped(), 76 model: ActorModel.unscoped(),
77 required: true, 77 required: true,
78 include: [ 78 include: [
@@ -387,24 +387,6 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
387 .findByPk(id) 387 .findByPk(id)
388 } 388 }
389 389
390 static loadByUUIDAndPopulateAccount (uuid: string) {
391 const query = {
392 include: [
393 {
394 model: ActorModel,
395 required: true,
396 where: {
397 uuid
398 }
399 }
400 ]
401 }
402
403 return VideoChannelModel
404 .scope([ ScopeNames.WITH_ACCOUNT ])
405 .findOne(query)
406 }
407
408 static loadByUrlAndPopulateAccount (url: string) { 390 static loadByUrlAndPopulateAccount (url: string) {
409 const query = { 391 const query = {
410 include: [ 392 include: [
@@ -510,7 +492,6 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
510 492
511 return { 493 return {
512 id: this.id, 494 id: this.id,
513 uuid: actor.uuid,
514 name: actor.name, 495 name: actor.name,
515 displayName: this.getDisplayName(), 496 displayName: this.getDisplayName(),
516 url: actor.url, 497 url: actor.url,