Add voting to the front end

Make send the new weight in the response to the PUT request.
Make frontend update the weight based on the response.
Display error message if any errors occur.