diff --git a/package-lock.json b/package-lock.json index df90531..c9252e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/http", - "version": "5.2.0", + "version": "5.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/http", - "version": "5.2.0", + "version": "5.3.0", "license": "MIT", "devDependencies": { "@athenna/artisan": "^5.1.0", diff --git a/package.json b/package.json index 73c92ce..94d4bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/http", - "version": "5.2.0", + "version": "5.3.0", "description": "The Athenna Http server. Built on top of fastify.", "license": "MIT", "author": "João Lenon ", diff --git a/src/context/Response.ts b/src/context/Response.ts index 80cf2c1..e68f46b 100644 --- a/src/context/Response.ts +++ b/src/context/Response.ts @@ -117,9 +117,10 @@ export class Response { * ``` */ public async view(view: string, data?: any): Promise { - View.edge.share({ request: this.request }) - - const content = await View.render(view, data) + const content = await View.edge + .createRenderer() + .share({ request: this.request }) + .render(view, data) await this.safeHeader('Content-Type', 'text/html; charset=utf-8').send( content