diff options
author | Adrian Batos-Parac <adrian.batos-parac@amdocs.com> | 2018-04-30 16:15:45 -0400 |
---|---|---|
committer | Adrian Batos-Parac <adrian.batos-parac@amdocs.com> | 2018-04-30 16:15:45 -0400 |
commit | 36b5671af2c3eec5ca81663382c4ca2898f79e55 (patch) | |
tree | 07d58851dc227322a9842adec0bf6ea1380d43be /src/chameleon/handler.clj | |
parent | 8e52114cf9289dd85c8838bf0eb8c24f5e2c7f99 (diff) |
Fix provenance capabilities
Fixes the issue where provenance was not properly being propagated to
the Gallifrey server.
Change-Id: Icc5f4fd3499a04aa710511879fc2d827d2bcc618
Issue-ID: AAI-797
Signed-off-by: abatos <adrian.batos-parac@amdocs.com>
Diffstat (limited to 'src/chameleon/handler.clj')
-rw-r--r-- | src/chameleon/handler.clj | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chameleon/handler.clj b/src/chameleon/handler.clj index 2a4c0f7..fd97bf1 100644 --- a/src/chameleon/handler.clj +++ b/src/chameleon/handler.clj @@ -1,6 +1,5 @@ (ns chameleon.handler (:require [chameleon.route :as c-route] - [chameleon.aai-processor] [utilis.map :refer [map-vals compact]] [liberator.core :refer [defresource]] [compojure.core :refer [GET PUT PATCH ANY defroutes]] @@ -16,13 +15,16 @@ (declare handler) (defonce ^:private g-host (atom nil)) +(defonce ^:private g-transformer nil) -(defmethod ig/init-key :chameleon/handler [_ {:keys [gallifrey-host]}] +(defmethod ig/init-key :chameleon/handler [_ {:keys [gallifrey-host gallifrey-transformer]}] (reset! g-host gallifrey-host) + (def g-transformer gallifrey-transformer) handler) (defmethod ig/halt-key! :chameleon/handler [_ _] - (reset! g-host nil)) + (reset! g-host nil) + (def g-transformer nil)) (declare serialize de-serialize) @@ -39,7 +41,7 @@ :body json/parse-string (dissoc "_meta") - (chameleon.aai-processor/from-gallifrey))}))) + (g-transformer))}))) :existed? (fn [ctx] (when-let [status (-> (c-route/query @g-host id type (-> ctx :request |