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

List Users Query #4

Closed
5 tasks done
kavinphan opened this issue Jan 20, 2025 · 0 comments · Fixed by #15
Closed
5 tasks done

List Users Query #4

kavinphan opened this issue Jan 20, 2025 · 0 comments · Fixed by #15
Assignees

Comments

@kavinphan
Copy link
Contributor

kavinphan commented Jan 20, 2025

Description

Create a GET route handler at /api/users that returns a list of all User records.

Success Criteria

  • If the request does not have a valid session, then GET /api/users returns a 401 status code with JSON body {"message": "Session required"}
  • If the request session user type is not STAFF, ADMIN or SUPER_ADMIN, then GET /api/users returns a 403 status code with JSON body {"message": "Must be STAFF, ADMIN, or SUPER_ADMIN"}
  • GET /api/users returns a 200 status code and all User records as JSON objects (include email and type fields only)
  • The route handler is documented with a description of its function, parameters, and responses
  • There is a test file that covers the success criteria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants