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

tokenify the last few payload routes #1174

Closed
ollibowers opened this issue Jul 30, 2024 · 0 comments · Fixed by #1195
Closed

tokenify the last few payload routes #1174

ollibowers opened this issue Jul 30, 2024 · 0 comments · Fixed by #1195
Assignees
Labels
👤 closed for help 👥 Closed to external help, team only 📝 feature 🧠 New feature or request 🫣 331 🤫 Is only in scope within the current 331 branch

Comments

@ollibowers
Copy link
Collaborator

ollibowers commented Jul 30, 2024

There are 2 (or rather 3 if u include ctf) routes that still use a userdata payload (prepareUserPayload). These routes are /courses/getAllUnlocked/ and /courses/coursesUnlockedWhenTaken/.

Fix these to use token, as it is annoying me.

These routes require a User type object to work with (what is known as the "algo user"), as they do condition checking. However, you only get a Storage type object from the get_setup_user(userid) function. Thus, you will also need to create a function to convert Storage -> User. Give this a go yourself first, otherwise I do have some old code for this. Feel free to put this function as a static method on the User class, would go hard.

Once done, also remove the prepareUserPayload function, and trim down any user data fetches that were being called just for this.

@ollibowers ollibowers added 📝 feature 🧠 New feature or request 👤 closed for help 👥 Closed to external help, team only 🫣 331 🤫 Is only in scope within the current 331 branch labels Jul 30, 2024
@ollibowers ollibowers assigned ollibowers and unassigned chanfaileui Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👤 closed for help 👥 Closed to external help, team only 📝 feature 🧠 New feature or request 🫣 331 🤫 Is only in scope within the current 331 branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants