diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-08 17:31:21 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-08 17:31:21 +0100 |
commit | f595d3947708114deeed4312cc5ffd285745b090 (patch) | |
tree | e2fef8fae4e9d9ee6039ea2ab53eb20d11002969 /server/models | |
parent | e600e1fea275c12f4420e23624804617e61a082c (diff) | |
download | PeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.gz PeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.zst PeerTube-f595d3947708114deeed4312cc5ffd285745b090.zip |
Finish admin design
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 8b1eb1f96..d46fdeebe 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -564,6 +564,22 @@ toActivityPubObject = function (this: VideoInstance) { | |||
564 | } | 564 | } |
565 | } | 565 | } |
566 | 566 | ||
567 | let category | ||
568 | if (this.category) { | ||
569 | category = { | ||
570 | identifier: this.category + '', | ||
571 | name: this.getCategoryLabel() | ||
572 | } | ||
573 | } | ||
574 | |||
575 | let licence | ||
576 | if (this.licence) { | ||
577 | licence = { | ||
578 | identifier: this.licence + '', | ||
579 | name: this.getLicenceLabel() | ||
580 | } | ||
581 | } | ||
582 | |||
567 | let likesObject | 583 | let likesObject |
568 | let dislikesObject | 584 | let dislikesObject |
569 | 585 | ||
@@ -635,14 +651,8 @@ toActivityPubObject = function (this: VideoInstance) { | |||
635 | duration: 'PT' + this.duration + 'S', | 651 | duration: 'PT' + this.duration + 'S', |
636 | uuid: this.uuid, | 652 | uuid: this.uuid, |
637 | tag, | 653 | tag, |
638 | category: { | 654 | category, |
639 | identifier: this.category + '', | 655 | licence, |
640 | name: this.getCategoryLabel() | ||
641 | }, | ||
642 | licence: { | ||
643 | identifier: this.licence + '', | ||
644 | name: this.getLicenceLabel() | ||
645 | }, | ||
646 | language, | 656 | language, |
647 | views: this.views, | 657 | views: this.views, |
648 | nsfw: this.nsfw, | 658 | nsfw: this.nsfw, |