diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-28 11:36:33 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-28 11:38:08 +0200 |
commit | a1eda903a497857017495f37a1fd3593ba7ab23c (patch) | |
tree | a109f34af8b18c087caf6d5a7264267550f0416d /server/controllers | |
parent | 012580d98f489e599d44a9a2a0bdc892b9455a90 (diff) | |
download | PeerTube-a1eda903a497857017495f37a1fd3593ba7ab23c.tar.gz PeerTube-a1eda903a497857017495f37a1fd3593ba7ab23c.tar.zst PeerTube-a1eda903a497857017495f37a1fd3593ba7ab23c.zip |
Support '/w/' and '/w/p/' for watch page
And use them as default in client
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/bots.ts | 2 | ||||
-rw-r--r-- | server/controllers/client.ts | 4 | ||||
-rw-r--r-- | server/controllers/feeds.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts index 8d1fa72f3..9e92063d4 100644 --- a/server/controllers/bots.ts +++ b/server/controllers/bots.ts | |||
@@ -75,7 +75,7 @@ async function getSitemapLocalVideoUrls () { | |||
75 | }) | 75 | }) |
76 | 76 | ||
77 | return data.map(v => ({ | 77 | return data.map(v => ({ |
78 | url: WEBSERVER.URL + '/videos/watch/' + v.uuid, | 78 | url: WEBSERVER.URL + '/w/' + v.uuid, |
79 | video: [ | 79 | video: [ |
80 | { | 80 | { |
81 | title: v.name, | 81 | title: v.name, |
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 35e5af9d1..fcccc48e0 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -19,8 +19,8 @@ const testEmbedPath = join(distPath, 'standalone', 'videos', 'test-embed.html') | |||
19 | 19 | ||
20 | // Special route that add OpenGraph and oEmbed tags | 20 | // Special route that add OpenGraph and oEmbed tags |
21 | // Do not use a template engine for a so little thing | 21 | // Do not use a template engine for a so little thing |
22 | clientsRouter.use('/videos/watch/playlist/:id', asyncMiddleware(generateWatchPlaylistHtmlPage)) | 22 | clientsRouter.use([ '/w/p/:id', '/videos/watch/playlist/:id' ], asyncMiddleware(generateWatchPlaylistHtmlPage)) |
23 | clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage)) | 23 | clientsRouter.use([ '/w/:id', '/videos/watch/:id' ], asyncMiddleware(generateWatchHtmlPage)) |
24 | clientsRouter.use([ '/accounts/:nameWithHost', '/a/:nameWithHost' ], asyncMiddleware(generateAccountHtmlPage)) | 24 | clientsRouter.use([ '/accounts/:nameWithHost', '/a/:nameWithHost' ], asyncMiddleware(generateAccountHtmlPage)) |
25 | clientsRouter.use([ '/video-channels/:nameWithHost', '/c/:nameWithHost' ], asyncMiddleware(generateVideoChannelHtmlPage)) | 25 | clientsRouter.use([ '/video-channels/:nameWithHost', '/c/:nameWithHost' ], asyncMiddleware(generateVideoChannelHtmlPage)) |
26 | clientsRouter.use('/@:nameWithHost', asyncMiddleware(generateActorHtmlPage)) | 26 | clientsRouter.use('/@:nameWithHost', asyncMiddleware(generateActorHtmlPage)) |
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index f0717bbbc..865f5c2a1 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts | |||
@@ -293,7 +293,7 @@ function addVideosToFeed (feed, videos: VideoModel[]) { | |||
293 | feed.addItem({ | 293 | feed.addItem({ |
294 | title: video.name, | 294 | title: video.name, |
295 | id: video.url, | 295 | id: video.url, |
296 | link: WEBSERVER.URL + '/videos/watch/' + video.uuid, | 296 | link: WEBSERVER.URL + '/w/' + video.uuid, |
297 | description: video.getTruncatedDescription(), | 297 | description: video.getTruncatedDescription(), |
298 | content: video.description, | 298 | content: video.description, |
299 | author: [ | 299 | author: [ |