From f55b9febe8974f861e2179baddaf9d48fa73552c Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 22 Feb 2018 00:38:26 -0300 Subject: A better swagger documentation and a better routing test --- src/clj/queue_api/db/core.clj | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/clj/queue_api/db') diff --git a/src/clj/queue_api/db/core.clj b/src/clj/queue_api/db/core.clj index 0482feb..adbda25 100644 --- a/src/clj/queue_api/db/core.clj +++ b/src/clj/queue_api/db/core.clj @@ -16,12 +16,12 @@ (defn add-agent "Add an agent into the database" - [{:keys [id name primary-skillset secondary-skillset]}] + [{:keys [id name primary_skillset secondary_skillset]}] (d/transact! conn [{:agent/id id :agent/name name - :agent/primary-skillset primary-skillset - :agent/secondary-skillset secondary-skillset}])) + :agent/primary-skillset primary_skillset + :agent/secondary-skillset secondary_skillset}])) (defn add-job "Add a job into the database" @@ -107,6 +107,11 @@ [id] (d/entity @conn [:agent/id id])) +(defn job + "Get a job by id" + [id] + (d/entity @conn [:job/id id])) + (defn fittest-job "Get the fittest job for a agent `id`." [^String id] -- cgit v1.2.3