Replace /.tokens with /.health and /.accounts

This commit is contained in:
Zed 2023-10-31 12:04:32 +00:00
commit 4120558649
7 changed files with 82 additions and 45 deletions

View file

@ -1,10 +1,13 @@
# SPDX-License-Identifier: AGPL-3.0-only
import jester
import router_utils
import ".."/[tokens, types]
import ".."/[auth, types]
proc createDebugRouter*(cfg: Config) =
router debug:
get "/.tokens":
get "/.health":
respJson getAccountPoolHealth()
get "/.accounts":
cond cfg.enableDebug
respJson getPoolJson()
respJson getAccountPoolDebug()