Remove export on `rpc`
This commit is contained in:
parent
a4dbb5ece4
commit
8b1b933d5d
|
@ -71,18 +71,18 @@ macro rpc*(server: var RpcServer, path: string, body: untyped): untyped =
|
|||
if returnType == ident"JsonNode":
|
||||
# `JsonNode` results don't need conversion
|
||||
result.add( quote do:
|
||||
proc `procName`*(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
proc `procName`(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
`res` = await `doMain`(`paramsIdent`)
|
||||
)
|
||||
else:
|
||||
result.add(quote do:
|
||||
proc `procName`*(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
proc `procName`(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
`res` = %await `doMain`(`paramsIdent`)
|
||||
)
|
||||
else:
|
||||
# no return types, inline contents
|
||||
result.add(quote do:
|
||||
proc `procName`*(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
proc `procName`(`paramsIdent`: JsonNode): Future[JsonNode] {.async.} =
|
||||
`setup`
|
||||
`procBody`
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue