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: add REST API helpers #14

Closed
wants to merge 2 commits into from
Closed

feat: add REST API helpers #14

wants to merge 2 commits into from

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Nov 23, 2020

✔️ Makes for very minimal API construction

❌ Downside is the slight increase in size: 0.3Kb

Happy for this to be closed. It's also trivial for an end-user to add this to the app instance.

@pi0
Copy link
Member

pi0 commented Nov 23, 2020

Only downside is see with this is creating a wrapper function to filter out method. Also it wouldn't be easy for specify in nuxt config for example.

We would support it with layer.match() (and { method: 'get' / app.get }

@codecov-io
Copy link

Codecov Report

Merging #14 (1785cb5) into main (35408ce) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #14   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines          112       121    +9     
  Branches        29        30    +1     
=========================================
+ Hits           112       121    +9     
Impacted Files Coverage Δ
src/helpers.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35408ce...1785cb5. Read the comment docs.

@pi0 pi0 mentioned this pull request Dec 15, 2020
@pi0
Copy link
Member

pi0 commented Dec 15, 2020

Closing since PR is stalled. Also opened #18 to investigate method filtering.

@pi0 pi0 closed this Dec 15, 2020
@pi0 pi0 deleted the method-helpers branch December 15, 2020 11:33
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.

3 participants