all repos — litestore @ 44d7b0a31fb5db039a6a5309822bc8c3616dab40

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

44d7b0a31fb5db039a6a5309822bc8c3616dab40

parent

c71fc19866820b68269c88d1fe97b7606c602fa8

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)