2022-02-01 11:12:54 +01:00

18 lines
509 B
Nim

import json
import core
import response_type
export response_type
proc saveMailserver*(id: string, name: string, enode: string, fleet: string):
RpcResponse[JsonNode] {.raises: [Exception].} =
let payload = %* [{
"id": id,
"name": name,
"address": enode,
"fleet": fleet
}]
result = core.callPrivateRPC("mailservers_addMailserver", payload)
proc getMailservers*(): RpcResponse[JsonNode] {.raises: [Exception].} =
result = core.callPrivateRPC("mailservers_getMailservers")