diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-08 10:53:41 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-08 11:15:11 +0100 |
commit | a59f210ff3a4cc87dd19aeaaf0f43f63a8310791 (patch) | |
tree | 82ffcc8f6dcee07ad0776a5d3937f8953a958bf8 /server/models/video | |
parent | e5024f5181b2e8ec23a58a821671000041b5bf2b (diff) | |
download | PeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.tar.gz PeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.tar.zst PeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.zip |
Refactor a little bit client canonical URL
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-channel.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 202dc513f..0c8aef18f 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -18,6 +18,7 @@ import { | |||
18 | Table, | 18 | Table, |
19 | UpdatedAt | 19 | UpdatedAt |
20 | } from 'sequelize-typescript' | 20 | } from 'sequelize-typescript' |
21 | import { MAccountActor } from '@server/types/models' | ||
21 | import { ActivityPubActor } from '../../../shared/models/activitypub' | 22 | import { ActivityPubActor } from '../../../shared/models/activitypub' |
22 | import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' | 23 | import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' |
23 | import { | 24 | import { |
@@ -628,6 +629,10 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
628 | }) | 629 | }) |
629 | } | 630 | } |
630 | 631 | ||
632 | getLocalUrl (this: MAccountActor | MChannelActor) { | ||
633 | return WEBSERVER.URL + `/video-channels/` + this.Actor.preferredUsername | ||
634 | } | ||
635 | |||
631 | getDisplayName () { | 636 | getDisplayName () { |
632 | return this.name | 637 | return this.name |
633 | } | 638 | } |