@athenna/http 3.2.0 → 3.2.1

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.
@@ -18,6 +18,9 @@ export class FastifyHandler {
18
18
  return async (req, res) => {
19
19
  const request = new Request(req);
20
20
  const response = new Response(res);
21
+ if (!req.data) {
22
+ req.data = {};
23
+ }
21
24
  await handler({
22
25
  request,
23
26
  response,
@@ -22,7 +22,7 @@ export class ServerImpl {
22
22
  this.fastify = fastify.fastify(options);
23
23
  this.isListening = false;
24
24
  this.fastify.decorateReply('body', null);
25
- this.fastify.decorateRequest('data', {});
25
+ this.fastify.decorateRequest('data', null);
26
26
  }
27
27
  /**
28
28
  * Get the representation of the internal radix tree used by the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/http",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "The Athenna Http server. Built on top of fastify.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",