mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +00:00
Made it possible to input loose JSON into find view inputs
I.e. `{ key: 'val' }` or `{ 'num': 2 }` besides `{ "strict": "json" }`.
This commit is contained in:
parent
3e293910ea
commit
eef74b306b
@ -1,6 +1,7 @@
|
||||
## [Unreleased]
|
||||
|
||||
* Open dump in Explorer/Finder when finished (#43).
|
||||
* Made it possible (again) to input loose JSON into find view inputs, i.e. `{ key: 'val' }` or `{ 'num': 2 }` besides `{ "strict": "json" }`.
|
||||
|
||||
## [v0.2.1]
|
||||
|
||||
|
@ -48,7 +48,13 @@
|
||||
|
||||
querying = `Querying ${collection.key}…`;
|
||||
activePath = [];
|
||||
const newResult = await FindItems(collection.hostKey, collection.dbKey, collection.key, JSON.stringify(form));
|
||||
const newResult = await FindItems(collection.hostKey, collection.dbKey, collection.key, JSON.stringify({
|
||||
fields: convertLooseJson(form.fields || defaults.fields),
|
||||
limit: form.limit ?? defaults.limit,
|
||||
query: convertLooseJson(form.query) || defaults.query,
|
||||
skip: form.skip ?? defaults.skip,
|
||||
sort: convertLooseJson(form.sort) || defaults.sort,
|
||||
}));
|
||||
|
||||
if (newResult) {
|
||||
newResult.results = newResult.results?.map(s => EJSON.parse(s, { relaxed: false }));
|
||||
|
Loading…
Reference in New Issue
Block a user