I use
scoreBoardService.addJSONObject(leaderBoardCollection, jsonDoc);
scoreBoardService.saveUserScore(gameName,userName,gameScore);
to update the score of a user, but if the users game score decreases the new score value is not stored in the leaderboard, the old (bigger) score remains. What is the reason for this behavior? I use ELO as scores.
Strange is that I get a success callback.
onSuccess: {"app42":{"response":{"success":true,"games":{"game":{"name":"xxxx","scores":{"score":{"userName":"debug1","value":986,"createdOn":"2018-07-23T00:02:59.661Z","scoreId":"_v3NLPf3WvvvNMuof5c0phreZ56wM=","jsonDoc":{"statData":"{name:Desktop,rank:1,elo:986,playedGames:4,wonGames:1}","_id":{"$oid":"5b551b33e4b03d3f87a8b930"},"_$scoreId":"_v3NLPf3WvvvNMuof5c0phreZ56wM=","name":"Desktop","_$owner":{"owner":"debug1"},"_$createdAt":"2018-07-23T00:02:59.667Z","