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

Like/Unlike Button links require Auth header. Suggest using AJAX to complete server-side. #44

Open
jaungiers opened this issue Oct 11, 2016 · 0 comments

Comments

@jaungiers
Copy link

Simply making /like/userID links on the Like/Unlike buttons produce a 404 error when clicked. This is because sending the web browser down those links with no authentication header doesn't give auth or context on who is sending the like request.

I've improved this function by transforming the buttons into Ajax calls back to the Flask app, which in turn calls the API _get() request to the Like URL, passing with it the authenticated headers and then parsing the response back to the front end (status and match) to indicate success in Liking the profile, and whether that like has resulted in a match.

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

No branches or pull requests

1 participant