all repos — litestore @ f6e4ce6a58a1de792e32532c0b008eb4315284b5

A minimalist nosql document store.

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
commit

f6e4ce6a58a1de792e32532c0b008eb4315284b5

parent

3eaae774807611785a1ef8c8e3c17f39b8295f95

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/litestorepkg/lib/api_v7.nimsrc/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)