Skip to content

Commit

Permalink
feat: share request instance with templates
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 22, 2023
1 parent e859198 commit b466041
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bindings/edge/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ export function bridgeEdgeAdonisJS(app: ApplicationService, router: Router) {
/**
* Creating a isolated instance of edge renderer
*/
HttpContext.getter('view', function () {
return edge.createRenderer()
HttpContext.getter('view', function (this: HttpContext) {
return edge.createRenderer().share({
request: this.request,
})
})

/**
Expand Down

0 comments on commit b466041

Please sign in to comment.