Fix Controller request injection and bump version

This commit is contained in:
Garrett Mills 2022-03-30 12:13:33 -05:00
parent ba87ea32c3
commit 153f8f7685
2 changed files with 4 additions and 7 deletions

View File

@ -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",

View File

@ -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