Use strformat more

This commit is contained in:
Zed 2022-06-04 02:18:26 +02:00
commit 21e8f04fa4
11 changed files with 38 additions and 37 deletions

View file

@ -1,5 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-only
import strutils, uri
import strutils, strformat, uri
import jester
@ -37,7 +37,7 @@ proc createSearchRouter*(cfg: Config) =
resp Http404, showError("Invalid search", cfg)
get "/hashtag/@hash":
redirect("/search?q=" & encodeUrl("#" & @"hash"))
redirect(&"""/search?q={encodeUrl("#" & @"hash")}""")
get "/opensearch":
let url = getUrlPrefix(cfg) & "/search?q="