saving the ratings to the server -js