We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe9c49e commit 94dcf4dCopy full SHA for 94dcf4d
src/main/com/yetanalytics/lrs/pedestal/routes/activities.cljc
@@ -13,13 +13,18 @@
13
[ctx {:keys [error activity] ?etag :etag :as _activity-response}]
14
(if error
15
(assoc ctx :io.pedestal.interceptor.chain/error error)
16
- (assoc ctx
17
- :response
18
- (if activity
19
- (cond-> {:status 200 :body activity}
+ (let [activity-id (-> ctx
+ :xapi
+ :xapi.activities.GET.request/params
+ :activityId)]
20
+ (assoc ctx
21
+ :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
- ?etag))
- {:status 404}))))
27
+ ?etag))))))
28
29
(def handle-get
30
{:name ::handle-get
0 commit comments