Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified context #22

Open
Rokt33r opened this issue Jan 16, 2019 · 0 comments · May be fixed by #38
Open

Unified context #22

Rokt33r opened this issue Jan 16, 2019 · 0 comments · May be fixed by #38
Labels
enhancement New feature or request
Milestone

Comments

@Rokt33r
Copy link
Member

Rokt33r commented Jan 16, 2019

Both httpContext and injector are set by tachijs. To check they are set, we have to see one of them is defined like this.httpContext != null or this.injector != null.

To make it simple, I'm going to put everything in one property this.context.

So it will be like the below.

interface Context {
  req: express.Request
  res: express.Response
  inject: (key: string) => any
}

class BaseController {
  context?: Context
}

This will be implemented next version and old legacy props, inject, injector and httpContext are deprecated from v1.

@Rokt33r Rokt33r added this to the v1.0.0 milestone Jan 16, 2019
@Rokt33r Rokt33r added the enhancement New feature or request label Jan 16, 2019
@Rokt33r Rokt33r linked a pull request Mar 21, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant