spice-js 2.6.58 → 2.6.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -48,11 +48,16 @@ export default class RestHelper {
|
|
|
48
48
|
}
|
|
49
49
|
try {
|
|
50
50
|
let download_type = ctx.request.query.format || "csv";
|
|
51
|
+
let include_id = ctx.request.query.include_id;
|
|
51
52
|
let content;
|
|
52
53
|
if (download_type == "csv") {
|
|
53
54
|
const { flatten } = await import("flat");
|
|
55
|
+
|
|
54
56
|
let items = _.map(ctx.data, (item) => {
|
|
55
|
-
|
|
57
|
+
if (!include_id || include_id == "false") {
|
|
58
|
+
delete item.id;
|
|
59
|
+
}
|
|
60
|
+
delete item._permissions_;
|
|
56
61
|
return flatten(item);
|
|
57
62
|
});
|
|
58
63
|
let fields = _.union(
|