mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
* Rename waku_api to rest_api and underlying rest to endpoint for clearity * Rename node/api to node/kernel_api to suggest that it is an internal accessor to node interface + make everything compile after renaming * make waku api a top level import * fix use of relative path imports and use default to root rather in case of waku and tools modules
21 lines
657 B
Nim
21 lines
657 B
Nim
{.push raises: [].}
|
|
|
|
import
|
|
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]
|
|
import ../serdes, ../rest_serdes, ./types
|
|
|
|
export types
|
|
|
|
logScope:
|
|
topics = "waku node rest debug_api"
|
|
|
|
# TODO: Check how we can use a constant to set the method endpoint (improve "rest" pragma under nim-presto)
|
|
proc debugInfoV1*(): RestResponse[DebugWakuInfo] {.
|
|
rest, endpoint: "/info", meth: HttpMethod.MethodGet
|
|
.}
|
|
|
|
# TODO: Check how we can use a constant to set the method endpoint (improve "rest" pragma under nim-presto)
|
|
proc debugVersionV1*(): RestResponse[string] {.
|
|
rest, endpoint: "/version", meth: HttpMethod.MethodGet
|
|
.}
|