From 61a1520695c9f7cf089e03236e82fa322a9becf9 Mon Sep 17 00:00:00 2001 From: jvyden Date: Tue, 22 Feb 2022 15:54:05 -0500 Subject: [PATCH] Check type when checking for an existing score Closes #187 --- .../Controllers/GameApi/Slots/ScoreController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ProjectLighthouse/Controllers/GameApi/Slots/ScoreController.cs b/ProjectLighthouse/Controllers/GameApi/Slots/ScoreController.cs index e92785ba..a73adea9 100644 --- a/ProjectLighthouse/Controllers/GameApi/Slots/ScoreController.cs +++ b/ProjectLighthouse/Controllers/GameApi/Slots/ScoreController.cs @@ -64,7 +64,9 @@ public class ScoreController : ControllerBase break; } - IQueryable existingScore = this.database.Scores.Where(s => s.SlotId == score.SlotId && s.PlayerIdCollection == score.PlayerIdCollection); + IQueryable 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()) {