File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
src/main/com/yetanalytics/lrs/pedestal/routes Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 172172 ctx
173173 :response
174174 (if (or statement statement-result)
175- (if (get-in xapi [:xapi.statements.GET.request/params :attachments ])
175+ (let [?last-mod
176+ (or (get statement " stored" )
177+ (some-> statement-result
178+ :statements
179+ first
180+ (get " stored" )))]
181+ (if (get-in xapi [:xapi.statements.GET.request/params :attachments ])
176182 {:status 200
177- :headers (cond-> {" Content-Type" att-resp/content-type}
183+ :headers (cond-> (cond-> {" Content-Type" att-resp/content-type}
184+ ?last-mod (assoc " last-modified" ?last-mod))
178185 etag (assoc " etag" etag))
179186 ; ; shim, the protocol will be expected to return this
180187 :body (att-resp/build-multipart-async
202209 (if statement-result
203210 ; ; Multiple statements
204211 {:status 200
205- :headers {" Content-Type" " application/json" }
212+ :headers (cond-> {" Content-Type" " application/json" }
213+ ?last-mod (assoc " last-modified" ?last-mod))
206214 :body (si/lazy-statement-result-async
207215 (a/to-chan!
208216 (concat (cons :statements
213221 ; ; TODO: if content-type headers get set here the body
214222 ; ; is not coerced
215223 {:status 200
216- :body statement})))
224+ :headers (cond-> {}
225+ ?last-mod (assoc " last-modified" ?last-mod))
226+ :body statement}))))
217227 ; ; Not found
218228 {:status 404 :body " " }))
219229 (catch #?(:clj Exception
You can’t perform that action at this time.
0 commit comments