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.
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.