@flowerforce/flowerbase 1.7.2 → 1.7.3-beta.0
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.
|
@@ -115,7 +115,7 @@ const functionsController = (app_1, _a) => __awaiter(void 0, [app_1, _a], void 0
|
|
|
115
115
|
return JSON.stringify({ message: result.message, name: result.name });
|
|
116
116
|
}
|
|
117
117
|
res.type('application/json');
|
|
118
|
-
return JSON.stringify(result);
|
|
118
|
+
return JSON.stringify(bson_1.EJSON.serialize(result, { relaxed: false }));
|
|
119
119
|
}
|
|
120
120
|
catch (error) {
|
|
121
121
|
res.status(400);
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectId } from 'bson'
|
|
1
|
+
import { EJSON, ObjectId } from 'bson'
|
|
2
2
|
import type { FastifyRequest } from 'fastify'
|
|
3
3
|
import { ChangeStream, Document } from 'mongodb';
|
|
4
4
|
import { services } from '../../services'
|
|
@@ -141,7 +141,7 @@ export const functionsController: FunctionController = async (
|
|
|
141
141
|
return JSON.stringify({ message: result.message, name: result.name })
|
|
142
142
|
}
|
|
143
143
|
res.type('application/json')
|
|
144
|
-
return JSON.stringify(result)
|
|
144
|
+
return JSON.stringify(EJSON.serialize(result, { relaxed: false }));
|
|
145
145
|
} catch (error) {
|
|
146
146
|
res.status(400)
|
|
147
147
|
res.type('application/json')
|