mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Correctly set filter referrer everywhere
This commit is contained in:
parent
db7ccabb3b
commit
cebc4331bc
4 changed files with 5 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ const converters = require("../utils/converters")
|
|||
|
||||
module.exports = [
|
||||
{
|
||||
route: `/channel/(${constants.regex.ucid})`, methods: ["GET"], code: async ({req, fill}) => {
|
||||
route: `/channel/(${constants.regex.ucid})`, methods: ["GET"], code: async ({req, fill, url}) => {
|
||||
const id = fill[0]
|
||||
const user = getUser(req)
|
||||
const settings = user.getSettingsOrDefaults()
|
||||
|
|
@ -24,7 +24,7 @@ module.exports = [
|
|||
video.watched = watchedVideos.includes(video.videoId)
|
||||
})
|
||||
}
|
||||
return render(200, "pug/channel.pug", {data, subscribed, instanceOrigin})
|
||||
return render(200, "pug/channel.pug", {url, data, subscribed, instanceOrigin})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module.exports = [
|
|||
const filters = user.getFilters()
|
||||
results = converters.applyVideoFilters(results, filters).videos
|
||||
|
||||
return render(200, "pug/search.pug", {query, results, instanceOrigin})
|
||||
return render(200, "pug/search.pug", {url, query, results, instanceOrigin})
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ module.exports = [
|
|||
video.descriptionHtml = converters.rewriteVideoDescription(video.descriptionHtml, id)
|
||||
|
||||
return render(200, "pug/video.pug", {
|
||||
video, formats, subscribed, instanceOrigin, mediaFragment, autoplay, continuous,
|
||||
url, video, formats, subscribed, instanceOrigin, mediaFragment, autoplay, continuous,
|
||||
sessionWatched, sessionWatchedNext
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue