-
Notifications
You must be signed in to change notification settings - Fork 581
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 project API endpoints #51
Conversation
Codecov Report
@@ Coverage Diff @@
## main #51 +/- ##
==========================================
- Coverage 74.91% 71.92% -2.99%
==========================================
Files 30 64 +34
Lines 291 2711 +2420
Branches 30 30
==========================================
+ Hits 218 1950 +1732
- Misses 67 592 +525
- Partials 6 169 +163
Continue to review full report at Codecov.
|
r.Route("/projects", func(r chi.Router) { | ||
r.Use( | ||
httpmw.ExtractAPIKey(options.Database, nil), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳 Looks like I won't be needing test data much longer!
httpmw/organizationparam.go
Outdated
} | ||
|
||
// ExtractOrganizationParam grabs an organization and user membership from the "organization" URL parameter. | ||
// This middleware requires the API key middleware for authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment might be out-of-date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// This middleware requires the API key middleware for authentication. | |
// This middleware grabs the `:organization` URL parameter and makes it available on the request context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, but I can improve the wording here. It requires the API middleware prior for authentication. AKA higher in the HTTP callstack it requires it on the context. I'll fix this!
Thanks for offering, @kylecarbs ! I do usually prefer smaller PRs - but I think for our purpose of scaffolding / getting to black triangle, it's OK to have some big chunks of work to start. Once the big pieces like this are in place - it'll make it easier to be more incremental 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome @kylecarbs - thank you for implementing all this! This is huge for getting to our end-to-end flow. LGTM
Closes #36
{organization}
with a Chi URL parameter.paralleltest
linter forgolangci-lint
. It should improve test times!@bryphe-coder this PR could be decomposed if you feel it's best!