Fixed handling of raw documents It is now possible to only retrieve raw documents by specifying raw=true, not every time the Accept header is set to application/json.
Fabio Cevasco h3rald@h3rald.com
Thu, 14 Jul 2022 15:17:54 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/litestorepkg/lib/api_v7.nim
→
src/litestorepkg/lib/api_v7.nim
@@ -883,7 +883,7 @@ options.select = @["documents.id AS id", "created", "modified"]
try: parseQueryOptions(req.url.query, options); if id != "" and options.folder == "": - if req.url.query.contains("raw=true") or req.headers.hasKey("Accept") and req.headers["Accept"] == "application/json": + if req.url.query.contains("raw=true"): return LS.getRawDocument(id, options, req) else: return LS.getDocument(id, options, req)