PhilanthropyDataCommons / service

A project for collecting and serving public information associated with grant applications
GNU Affero General Public License v3.0
8 stars 2 forks source link

Add GET `/users` endpoint #946

Closed slifty closed 6 months ago

slifty commented 6 months ago

This PR adds a new /users endpoint which will allow the front end to look up the id associated with their session.

I decided to implement this with auth context awareness off the bat, which means administrative users can actually view ALL users in the system if they want.

Resolves #942

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 88.30%. Comparing base (b23b8a6) to head (8cb2d14).

:exclamation: Current head 8cb2d14 differs from pull request most recent head d2c3c13. Consider uploading reports for the commit d2c3c13 to get more accurate results

Files Patch % Lines
src/handlers/usersHandlers.ts 68.18% 6 Missing and 1 partial :warning:
...eryParameters/extractAuthenticationIdParameters.ts 83.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #946 +/- ## ========================================== - Coverage 88.48% 88.30% -0.18% ========================================== Files 119 123 +4 Lines 1650 1702 +52 Branches 206 210 +4 ========================================== + Hits 1460 1503 +43 - Misses 175 183 +8 - Partials 15 16 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

slifty commented 6 months ago

I think all of the untested lines are of the category of "it's OK not to test them"

hminsky2002 commented 6 months ago

Verifying success on all of the same checks as @reefdog. Hitting approve!