NagyZoltanPeter 1762548741
chore: clarify api folders (#3637)
* 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
2025-11-15 23:31:09 +01:00

16 lines
420 B
Nim

{.push raises: [].}
import chronicles, json_serialization, presto/[route, client, common]
import ../serdes, ../rest_serdes, ./types
export types
proc encodeBytes*(value: PushRequest, contentType: string): RestResult[seq[byte]] =
return encodeBytesOf(value, contentType)
proc sendPushRequest*(
body: PushRequest
): RestResponse[string] {.
rest, endpoint: "/lightpush/v1/message", meth: HttpMethod.MethodPost
.}