Skip to content

Commit

Permalink
SQL-215 refactor doc route fn
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Nov 20, 2023
1 parent 33578b9 commit aad95fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/com/yetanalytics/lrs/pedestal/routes.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
method
method-not-allowed
:route-name (keyword route-name-ns (name method))]
(let [params-interceptors
(cond->
[(xapi-i/params-interceptor
(let [doc-params-interceptor
(xapi-i/params-interceptor
(case resource-tuple
["activities" "state"]
(case method
Expand All @@ -65,7 +64,9 @@
:post :xapi.agents.profile.POST.request/params
:get :xapi.agents.profile.GET.request/params
:head :xapi.agents.profile.GET.request/params
:delete :xapi.agents.profile.DELETE.request/params)))]
:delete :xapi.agents.profile.DELETE.request/params)))
params-interceptors
(cond-> [doc-params-interceptor]
;; Scan files if scanner is present on PUT/POST
(and file-scanner
(contains? #{:put :post} method))
Expand Down

0 comments on commit aad95fc

Please sign in to comment.