-
Notifications
You must be signed in to change notification settings - Fork 0
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 and graphql endpoints for study rooms #29
Conversation
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.
We're moving away from implementing /all
routes for resources in favor of paginated root routes that allow empty filters. Feel free to reference the courses/instructors routes for how to implement such an endpoint, or ask me or Andrew for help if necessary.
Other than that looks decent overall, left comments for minor nits though. Great work 💪
Oh also as a side note please make sure to make the PR name compliant with conventional commits before merging. Thanks 👍 |
## Description Add next app for creating & deleting api keys ## Related Issue Closes #10 ## Motivation and Context ## How Has This Been Tested? Tested locally. Setup: ```bash docker compose up pnpm run users-db:migrate ``` * Users cannot create /delete keys when not authed * Users cannot create multiple keys ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation.
<!--- Provide a general summary of your changes in the Title above --> ## Description Introduce & default light mode for API Key interface <!--- Describe your changes in detail --> ## Related Issue Closes #34 <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation.
## Description Deploy key manager to AWS using SST Ion. DNS is still managed through Cloudflare. This honestly took me way longer than it should have because turns out SST won't verify an ACM cert using Cloudflare, so I just gave up and manually verified one, and passed in the cert ARN. Also created a README with remarks on the lack of support for local development. Hopefully we'll find a way to fix that soon, but the deployment process is just so involved. ## Motivation and Context Cloudflare Workers do not support parts of the Node.js crypto library, which Auth.js requires. ## How Has This Been Tested? Go to https://dashboard.anteaterapi.com. ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation.
<!--- Provide a general summary of your changes in the Title above --> ## Description * Add disabled state to create / edit / delete buttons when in progress * Add placeholders while pages are loading api key data ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> Closes #37 ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> Prevents sending multiple requests while in progress ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Tested locally ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation. Co-authored-by: Eddy Chen <[email protected]>
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.
LGTM, great work on this!
We should look into returning the available slots as a potential followup though, as this PR doesn't seem to do that.
Description
Created GraphQL and REST endpoints to provide study room data, namely:
Added description and directions fields to the studyRoomById endpoint to provide more details for each specific room.
Related Issue
resolves issue #2
Motivation and Context
These endpoints provide structured access to study room data in both REST and GraphQL formats, fulfilling the requirements outlined in issue #2. These changes allow users to access study room details as a whole, retrieve data for a specific room, or filter rooms based on criteria like location and capacity. This functionality is essential for making study room data available through the API in a scalable and flexible way.
How Has This Been Tested?
Tested locally on a development server using Postman. Verified:
REST Endpoints:
Access to /v2/rest/study-rooms/all returns all rooms.
Access to /v2/rest/study-rooms/{id} returns data for a specific room by ID.
Access to /v2/rest/study-rooms with query parameters returns filtered results.
GraphQL Queries:
Querying allStudyRooms returns a list of all study rooms with the expected fields.
Querying studyRoom(id: "<room_id>") returns details for a specific room, including description and directions if they are present.
Querying studyRooms(query: { location: "Science Library", capacityMin: 4 }) returns filtered results based on location and capacity.
Types of changes
Checklist: