diff --git a/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs b/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs index 9166f6fa..ac93e966 100644 --- a/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs +++ b/Refresh.GameServer/Database/GameDatabaseContext.Relations.cs @@ -416,6 +416,9 @@ public int GetTotalPlaysForLevelByUser(GameLevel level, GameUser user) => public int GetUniquePlaysForLevel(GameLevel level, bool includingAuthor = true) => this.UniquePlayLevelRelations.Count(r => r.Level == level && (includingAuthor || r.User != level.Publisher)); + public int GetTotalCompletionsForLevel(GameLevel level) => + this.GameSubmittedScores.Count(s => s.Level == level); + #endregion #region Comments diff --git a/Refresh.GameServer/Endpoints/Game/DataTypes/Response/GameLevelResponse.cs b/Refresh.GameServer/Endpoints/Game/DataTypes/Response/GameLevelResponse.cs index 0a207923..b0435302 100644 --- a/Refresh.GameServer/Endpoints/Game/DataTypes/Response/GameLevelResponse.cs +++ b/Refresh.GameServer/Endpoints/Game/DataTypes/Response/GameLevelResponse.cs @@ -46,15 +46,17 @@ public class GameLevelResponse : IDataConvertableFrom