mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-11-13 18:03:53 +00:00
Make sure to enable Clean JSON when select fields given
This commit is contained in:
parent
1adca4c49b
commit
07c239aaa1
@ -199,6 +199,9 @@ func (h *Handler) parseSelectFields(options *ExtendedRequestOptions, value strin
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
options.Columns = h.parseCommaSeparated(value)
|
options.Columns = h.parseCommaSeparated(value)
|
||||||
|
if len(options.Columns) > 1 {
|
||||||
|
options.CleanJSON = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseNotSelectFields parses x-not-select-fields header
|
// parseNotSelectFields parses x-not-select-fields header
|
||||||
@ -207,6 +210,9 @@ func (h *Handler) parseNotSelectFields(options *ExtendedRequestOptions, value st
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
options.OmitColumns = h.parseCommaSeparated(value)
|
options.OmitColumns = h.parseCommaSeparated(value)
|
||||||
|
if len(options.OmitColumns) > 1 {
|
||||||
|
options.CleanJSON = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseFieldFilter parses x-fieldfilter-{colname} header (exact match)
|
// parseFieldFilter parses x-fieldfilter-{colname} header (exact match)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user