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

Create tRPC Router for Reading Planners #598

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Awesome-E
Copy link
Member

The tRPC Route /api/trpc/external.roadmaps.getByGoogleID will now return user planners when given an auth token and a matching Google User ID

Screenshots

N/A

Test Plan

  • Make a request to the staging instance /api/trpc/external.roadmaps.getByGoogleID?input={"googleUserId":"<google_user_id>"} with the Bearer token. Ask privately for a sample Google User ID and the bearer token
  • Ensure that the roadmaps for only that user are returned
  • Check that unauthorized requests fail

Issues

Closes #518

The TRPC Route `/api/trpc/external.roadmaps.getByGoogleID` will now return user planners when given an auth token and a matching Google User ID
@MinhxNguyen7
Copy link
Member

Do you think there's a practical way for us to import your tRPC router, or is that not really possible?

CC: @alexanderl19

@MinhxNguyen7
Copy link
Member

I assume the googleUserID is universal, right?

@Awesome-E
Copy link
Member Author

Awesome-E commented Feb 19, 2025

I assume the googleUserID is universal, right?

I believe so. If you have Google Auth on your side, you can let me know your Google User ID in AA and I can see if it matches here.

Do you think there's a practical way for us to import your tRPC router, or is that not really possible?

I'm not sure – from a quick search it seems the proper way to do this is to create a separate package. 🤔

Copy link
Contributor

@CadenLee2 CadenLee2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the Thunder Client VS Code extension

  • With my Google ID and the correct authorization: the results correctly match all the roadmaps saved to my account
  • With a presumably nonexistent Google ID and the correct authorization: successfully got a result of { "result": { "data": [] } }
  • With no authorization header: failed with the UNAUTHORIZED response
  • With incorrect authorization: failed with the UNAUTHORIZED response

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.

Create previously taken courses endpoint for AntAlmanac integration
3 participants