From 153f8f76856459cf8f5b97d0c45cb9fcfb5c2a82 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Wed, 30 Mar 2022 12:13:33 -0500 Subject: [PATCH] Fix Controller request injection and bump version --- package.json | 2 +- src/http/Controller.ts | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 426d0f1..a41fbec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@extollo/lib", - "version": "0.9.4", + "version": "0.9.5", "description": "The framework library that lifts up your code.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/http/Controller.ts b/src/http/Controller.ts index b9aa5e3..448ed89 100644 --- a/src/http/Controller.ts +++ b/src/http/Controller.ts @@ -1,5 +1,5 @@ import {Request} from './lifecycle/Request' -import {Container} from '../di' +import {Container, Inject} from '../di' import {CanonicalItemClass} from '../support/CanonicalReceiver' /** @@ -7,11 +7,8 @@ import {CanonicalItemClass} from '../support/CanonicalReceiver' * handle HTTP requests. */ export class Controller extends CanonicalItemClass { - constructor( - protected readonly request: Request, - ) { - super() - } + @Inject() + protected readonly request!: Request protected container(): Container { return this.request