-
Notifications
You must be signed in to change notification settings - Fork 302
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
🧹 Move public_profile code from app.py to auth.py #2462
Comments
Still struggling a bit on what would be the best approach to fix this. By far the easiest solution would be to simply remove the achievement, but this is not the desired solution. Shortly stated this is caused by a bad dependency implementation long ago (my bad...). We have to decide if re-writing the achievements structure is worth if or if we want to use a "bucket-fix" as described above. |
Hi @jpelay Another old issue to look into, I am not sure this is still relevant? |
Hi @jtwaleson! Here is another issue about cleaning up the code base that you might enjoy working on? (no rush of course, I know your already have 2 other issues to work on, but since we are cleaning up, we are also looking whether we have people to take on older open issues) |
@Felienne is this still the current state? I haven't really done something like this yet, so not sure if I can easily implement 'requests'? |
I don't know to be honest! Maybe @jpelay knows? If not, surely @rix0rrr will! |
Thanks for the confidence, but to be honest I'm not quite sure either 😅 What we have to go on is this:
So apparently there is some endpoint code that has to do with public profiles, that should have been in
Probably there is a 3rd file somewhere that currently imports That's why the public_profile code was put into
This is the part that confuses me the most.
The only thing that is making HTTP requests currently is:
Since Bottom line: I'm also not quite sure what was meant here. |
I think the point is to move this function: @app.route('/auth/public_profile', methods=['POST'])
@requires_login
def update_public_profile(user): To |
Description
Currently we store the public profile related POST functions in
app.py
to ensure we can push achievements to the users. We are unable to perform this action inauth.py
due to circular imports. However, with the use ofrequests
we can simply make a POST from anywhere on the website, not being restricted by any imports. We use the same structure for when we are retrieving achievements on the front-end.The text was updated successfully, but these errors were encountered: