mirror of
https://github.com/zedeus/nitter.git
synced 2025-04-21 16:34:12 +00:00
fix: route
This commit is contained in:
parent
eb2ae6571a
commit
6e15f03a95
2 changed files with 7 additions and 1 deletions
src
|
@ -52,6 +52,7 @@ createStatusRouter(cfg)
|
|||
createSearchRouter(cfg)
|
||||
createMediaRouter(cfg)
|
||||
createEmbedRouter(cfg)
|
||||
createJsonApiRouter(cfg)
|
||||
createRssRouter(cfg)
|
||||
createDebugRouter(cfg)
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
import asyncdispatch
|
||||
|
||||
import jester
|
||||
|
||||
import router_utils, timeline
|
||||
|
||||
proc createJsonApiRouter*(cfg: Config) =
|
||||
router jsonapi:
|
||||
get "/hello":
|
||||
cond cfg.enableJsonApi
|
||||
let headers = ["Content-Type": "application/json; charset=utf-8"]
|
||||
let headers = {"Content-Type": "application/json; charset=utf-8"}
|
||||
resp Http200, headers, """{"message": "Hello, world"}"""
|
Loading…
Reference in a new issue