From eff098003f3d3bebdb64ee7feef3cec026c3d4c5 Mon Sep 17 00:00:00 2001 From: Mitarashi Date: Fri, 14 Jan 2022 20:45:02 +0200 Subject: [PATCH] unified function call styles --- src/routes/embed.nim | 4 ++-- src/views/embed.nim | 2 +- src/views/tweet.nim | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/embed.nim b/src/routes/embed.nim index 7057f67..1a93d40 100644 --- a/src/routes/embed.nim +++ b/src/routes/embed.nim @@ -14,7 +14,7 @@ proc createEmbedRouter*(cfg: Config) = if convo == nil or convo.tweet == nil or convo.tweet.video.isNone: resp Http404 - resp renderVideoEmbed(cfg, request, convo.tweet) + resp renderVideoEmbed(convo.tweet, cfg, request) get "/@user/status/@id/embed": let @@ -25,7 +25,7 @@ proc createEmbedRouter*(cfg: Config) = if convo == nil or convo.tweet == nil: resp Http404 - resp $renderTweetEmbed(convo.tweet, prefs, path, cfg, request) + resp $renderTweetEmbed(convo.tweet, path, prefs, cfg, request) get "/embed/Tweet.html": let id = @"id" diff --git a/src/views/embed.nim b/src/views/embed.nim index edce944..e6afffd 100644 --- a/src/views/embed.nim +++ b/src/views/embed.nim @@ -8,7 +8,7 @@ import general, tweet const doctype = "\n" -proc renderVideoEmbed*(cfg: Config; req: Request; tweet: Tweet): string = +proc renderVideoEmbed*(tweet: Tweet; cfg: Config; req: Request): string = let thumb = get(tweet.video).thumb let vidUrl = getVideoEmbed(cfg, tweet.id) let prefs = Prefs(hlsPlayback: true) diff --git a/src/views/tweet.nim b/src/views/tweet.nim index 88edac4..e8dfc83 100644 --- a/src/views/tweet.nim +++ b/src/views/tweet.nim @@ -356,7 +356,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0; a(class="show-thread", href=("/i/status/" & $tweet.threadId)): text "Show this thread" -proc renderTweetEmbed*(tweet: Tweet; prefs: Prefs; path: string; cfg: Config; req: Request): VNode = +proc renderTweetEmbed*(tweet: Tweet; path: string; prefs: Prefs; cfg: Config; req: Request): VNode = buildHtml(tdiv(class="tweet-embed")): renderHead(prefs, cfg, req) renderTweet(tweet, prefs, path, mainTweet=true)