Experiment with Listener Creation
This commit is contained in:
19
server/agent.nim
Normal file
19
server/agent.nim
Normal file
@@ -0,0 +1,19 @@
|
||||
import prologue
|
||||
|
||||
# /agent/register
|
||||
proc agentRegister*(ctx: Context) {.async.} =
|
||||
|
||||
let body: JsonNode = ctx.request.body().parseJson()
|
||||
echo body
|
||||
|
||||
resp jsonResponse(body, Http200)
|
||||
|
||||
|
||||
|
||||
# /agent/{uuid}/tasks
|
||||
proc agentTasks*(ctx: Context) {.async.} =
|
||||
resp "<h1>Agent Tasks</h1>"
|
||||
|
||||
# /agent/{uuid}/results
|
||||
proc agentResults*(ctx: Context) {.async.} =
|
||||
resp "<h1>Agent Results</h1>"
|
||||
Reference in New Issue
Block a user