2024-06-28 10:34:57 +00:00
|
|
|
{.push raises: [].}
|
2023-02-13 14:22:24 +00:00
|
|
|
|
|
|
|
import
|
2024-03-15 23:08:47 +00:00
|
|
|
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]
|
|
|
|
import ../serdes, ../responses, ../rest_serdes, ./types
|
2023-02-13 14:22:24 +00:00
|
|
|
|
|
|
|
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)
|
2024-03-15 23:08:47 +00:00
|
|
|
proc debugInfoV1*(): RestResponse[DebugWakuInfo] {.
|
|
|
|
rest, endpoint: "/debug/v1/info", meth: HttpMethod.MethodGet
|
|
|
|
.}
|
2023-02-13 14:22:24 +00:00
|
|
|
|
|
|
|
# TODO: Check how we can use a constant to set the method endpoint (improve "rest" pragma under nim-presto)
|
2024-03-15 23:08:47 +00:00
|
|
|
proc debugVersionV1*(): RestResponse[string] {.
|
|
|
|
rest, endpoint: "/debug/v1/version", meth: HttpMethod.MethodGet
|
|
|
|
.}
|