File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
src/main/com/yetanalytics/lrs/pedestal/routes Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change 1616 (let [activity-id (-> ctx
1717 :xapi
1818 :xapi.activities.GET.request/params
19- :activityId )]
19+ :activityId )
20+ version (:com.yetanalytics.lrs/spec-version ctx)]
2021 (assoc ctx
2122 :response
22- (cond-> {:status 200
23- :body (or activity
24- {" id" activity-id
25- " objectType" " Activity" })}
26- ?etag (assoc :com.yetanalytics.lrs.pedestal.interceptor/etag
27- ?etag))))))
23+ (case version
24+ " 1.0.3"
25+ (if activity
26+ (cond-> {:status 200
27+ :body activity}
28+ ?etag (assoc :com.yetanalytics.lrs.pedestal.interceptor/etag
29+ ?etag))
30+ {:status 404 })
31+ " 2.0.0"
32+ (cond-> {:status 200
33+ :body (or activity
34+ {" id" activity-id
35+ " objectType" " Activity" })}
36+ ?etag (assoc :com.yetanalytics.lrs.pedestal.interceptor/etag
37+ ?etag)))))))
2838
2939(def handle-get
3040 {:name ::handle-get
You can’t perform that action at this time.
0 commit comments