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

feat(core): add context.http and move statusCode there #2496

Merged
merged 1 commit into from Nov 26, 2021

Conversation

vonagam
Copy link
Member

@vonagam vonagam commented Nov 25, 2021

This is context.http from #2484.

Here it contains only statusCode (can be renamed to status or not, don't have an opinion one way or another so kept previous name), with the idea to add responseHeaders later (redirect is not needed since it will be covered by those two).

I used getter/setter to prevent having two sources of truth and things getting out of sync. Also ideally a depreciation message should be added to those accessors that will write a warning first time one of them is accessed (a helper function for such depreciations can be added to @feathersjs/commons).

Copy link
Member

@daffl daffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thank you! Just two small somments.

packages/feathers/src/hooks/index.ts Show resolved Hide resolved
packages/feathers/src/declarations.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants