Remove export on `rpc`

This commit is contained in:
coffeepots 2018-06-04 14:15:56 +01:00
parent a4dbb5ece4
commit 8b1b933d5d
1 changed files with 3 additions and 3 deletions

View File

@ -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`
)