Check type when checking for an existing score

Closes #187
This commit is contained in:
jvyden 2022-02-22 15:54:05 -05:00
commit 61a1520695
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -64,7 +64,9 @@ public class ScoreController : ControllerBase
break;
}
IQueryable<Score> existingScore = this.database.Scores.Where(s => s.SlotId == score.SlotId && s.PlayerIdCollection == score.PlayerIdCollection);
IQueryable<Score> existingScore = this.database.Scores.Where(s => s.SlotId == score.SlotId)
.Where(s => s.PlayerIdCollection == score.PlayerIdCollection)
.Where(s => s.Type == score.Type);
if (existingScore.Any())
{