moved themes to be handled in renderHead and changed path to /embed

This commit is contained in:
Mitarashi
2022-01-14 19:34:10 +02:00
parent 3579bd8e30
commit 875a2c5387
4 changed files with 24 additions and 15 deletions

View File

@@ -15,12 +15,15 @@ proc createEmbedRouter*(cfg: Config) =
if convo == nil or convo.tweet == nil or convo.tweet.video.isNone:
resp Http404
resp renderVideoEmbed(cfg, convo.tweet)
resp renderVideoEmbed(cfg, request, convo.tweet)
get "/@user/status/@id/embedded":
get "/@user/status/@id/embed":
let
tweet = (await getTweet(@"id")).tweet
convo = await getTweet(@"id")
prefs = cookiePrefs()
path = getPath()
resp $renderEmbeddedTweet(tweet, cfg, prefs, path)
if convo == nil or convo.tweet == nil:
resp Http404
resp $renderEmbeddedTweet(convo.tweet, cfg, request, prefs, path)