Duel entre deux citations identiques
Sur la route
/citations/duels
avec le body
{"winner": "608aed1aed9b075f92b2705a", "looser": "608aed1aed9b075f92b2705a"}
nous avons le retour suivant :
{
"_id": "608aed1aed9b075f92b2705a",
"quote": "My eyes! The goggles do nothing!",
"character": "Rainier Wolfcastle",
"image": "https://cdn.glitch.com/3c3ffadc-3406-4440-bb95-d40ec8fcde72%2FRainierWolfcastle.png?1497567511035",
"characterDirection": "Left",
"origin": "The Simpsons",
"__v": 0,
"scores": {
"608aed1aed9b075f92b2705a": {
"_id": "608aef73c54bf07bf38c678a",
"wins": 1,
"looses": 0
}
}
},
{
"_id": "608aed1aed9b075f92b2705a",
"quote": "My eyes! The goggles do nothing!",
"character": "Rainier Wolfcastle",
"image": "https://cdn.glitch.com/3c3ffadc-3406-4440-bb95-d40ec8fcde72%2FRainierWolfcastle.png?1497567511035",
"characterDirection": "Left",
"origin": "The Simpsons",
"__v": 0,
"scores": {
"608aed1aed9b075f92b2705a": {
"_id": "608aef73c54bf07bf38c678c",
"wins": 0,
"looses": 1
}
}
}
]
Il devrait être impossible de faire un duel entre deux citations identiques, le résultat final indique 1 lose mais 0 win
"_id": "608aed1aed9b075f92b2705a",
"quote": "My eyes! The goggles do nothing!",
"character": "Rainier Wolfcastle",
"image": "https://cdn.glitch.com/3c3ffadc-3406-4440-bb95-d40ec8fcde72%2FRainierWolfcastle.png?1497567511035",
"characterDirection": "Left",
"origin": "The Simpsons",
"__v": 0,
"scores": {
"608aed1aed9b075f92b2705a": {
"_id": "608aef73c54bf07bf38c678c",
"wins": 0,
"looses":1,
}
}
},
Edited by JEANNIN DYLAN p1808182