src/components/views/RateWhites.js
/**
     * Method which makes put request to vote on the Cards
     * @param like Boolean, true => User likes Card, false => user doesn't like card
     */
Method which makes put request to vote on the Cards
@param like Boolean, true => User likes Card, false => user doesn't like card
Method which makes put request to vote on the Cards @param like Boolean true = > User likes Card false = > user doesn ' t like card
async function voteOnCard(like){
        if(plays.length===0) {
            setPlaysEmpty(true)
        }
        const otherUserId = currentPlay.userId.toString()
        const gameId = currentPlay.gameId
        const requestBody = JSON.stringify({userId:otherUserId, like})
        await api.put(`/users/${userId}/games/${gameId}/vote`, requestBody);
        setCurrentPLay(plays.shift())
    }
async function voteOnCard ( like ) { if ( plays . length === 0 ) { setPlaysEmpty ( true ) } const otherUserId = currentPlay . userId . toString ( ) const gameId = currentPlay . gameId const requestBody = JSON . stringify ( { userId : otherUserId , like } ) await api . put ( ` ${ userId } ${ gameId } ` , requestBody ) ; setCurrentPLay ( plays . shift ( ) ) }
Method which makes put request to vote on the Cards
 @param like Boolean, true => User likes Card, false => user doesn't like card
Method which makes put request to vote on the Cards @param like Boolean true = > User likes Card false = > user doesn ' t like card