mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Fix 404 when having ;threadId param
This commit is contained in:
parent
e2d8587bd3
commit
c0a4982ebe
2 changed files with 16 additions and 1 deletions
|
@ -138,7 +138,14 @@ async function generateEmbedHtmlPage (req: express.Request, res: express.Respons
|
|||
}
|
||||
|
||||
async function generateWatchHtmlPage (req: express.Request, res: express.Response) {
|
||||
const html = await ClientHtml.getWatchHTMLPage(req.params.id + '', req, res)
|
||||
// Thread link is '/w/:videoId;threadId=:threadId'
|
||||
// So to get the videoId we need to remove the last part
|
||||
let videoId = req.params.id + ''
|
||||
|
||||
const threadIdIndex = videoId.indexOf(';threadId')
|
||||
if (threadIdIndex !== -1) videoId = videoId.substring(0, threadIdIndex)
|
||||
|
||||
const html = await ClientHtml.getWatchHTMLPage(videoId, req, res)
|
||||
|
||||
return sendHTML(html, res, true)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue