@paralect/hive 0.1.28 → 0.1.30

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paralect/hive",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -224,7 +224,7 @@ class MongoService extends MongoQueryService {
224
224
  );
225
225
  }
226
226
 
227
- const findOptions = {};
227
+ const findOptions = { isIncludeSecureFields: true };
228
228
  if (options.session) findOptions.session = options.session;
229
229
  const { results: docs } = await this.find(query, findOptions);
230
230
  if (docs.length === 0) return [];
@@ -144,7 +144,13 @@ export default async (app) => {
144
144
  },
145
145
  validate(requestSchema),
146
146
  ..._.sortBy(middlewares, m => m.runOrder),
147
- handler
147
+ async ctx => {
148
+ const result = await handler(ctx);
149
+
150
+ if (!ctx.body && result) {
151
+ ctx.body = result;
152
+ }
153
+ }
148
154
  );
149
155
  });
150
156