@athenna/http 5.2.0 → 5.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/http",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
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>",
@@ -96,8 +96,10 @@ export class Response {
96
96
  * ```
97
97
  */
98
98
  async view(view, data) {
99
- View.edge.share({ request: this.request });
100
- const content = await View.render(view, data);
99
+ const content = await View.edge
100
+ .createRenderer()
101
+ .share({ request: this.request })
102
+ .render(view, data);
101
103
  await this.safeHeader('Content-Type', 'text/html; charset=utf-8').send(content);
102
104
  this.response.body = content;
103
105
  return this;