diff --git a/ProjectLighthouse/Controllers/EnterLevelController.cs b/ProjectLighthouse/Controllers/EnterLevelController.cs index 47378dca..1b34916a 100644 --- a/ProjectLighthouse/Controllers/EnterLevelController.cs +++ b/ProjectLighthouse/Controllers/EnterLevelController.cs @@ -55,8 +55,6 @@ namespace LBPUnion.ProjectLighthouse.Controllers v.UserId = user.UserId; v.GameVersion = gameVersion; this.database.VisitedLevels.Add(v); - await this.database.SaveChangesAsync(); - } switch (gameVersion) @@ -71,6 +69,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers return this.BadRequest(); } + await this.database.SaveChangesAsync(); + return this.Ok(); }