Skip to content

Commit

Permalink
Fix modules endpoint of file_metadatas API
Browse files Browse the repository at this point in the history
This patch fixes a couple of typos that prevented the "/modules" endpoint of
the file_metadatas API from working correctly.
  • Loading branch information
Sharpie committed Sep 2, 2017
1 parent e1b0424 commit 085e3e3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
module (get-in request [:route-params :module])
path (get-in request [:route-params :path])
modulepath (get-in @(:environments context) [environment "modulepath"])
root (str module "/files")
root (find-in-modulepath modulepath module "/files")
;; FIXME: Only allowed values are "manage" and "follow". There's
;; also a "source_permissions" parameter documented, but that
;; seems to be a docs bug since the param isn't actually used
Expand Down Expand Up @@ -414,12 +414,12 @@

(defn file-metadatas-handler
[context]
(let [module-handler (module-metadata-handler context)
(let [module-handler (module-metadatas-handler context)
plugin-handler (plugin-metadatas-handler context "lib")
pluginfact-handler (plugin-metadatas-handler context "facts.d")]
(-> (comidi/routes
(comidi/context "/puppet/v3/file_metadatas"
(comidi/GET ["/modules" [#"[a-z][a-z0-9_]*" :module] [#".*" :path]] request
(comidi/GET ["/modules/" [#"[a-z][a-z0-9_]*" :module] [#".*" :path]] request
(module-handler request))
(comidi/GET ["/plugins" [#".*" :path]] request
(plugin-handler request))
Expand Down

0 comments on commit 085e3e3

Please sign in to comment.