Fixed missing update on saving custom pet

This commit is contained in:
2021-10-31 14:42:50 -04:00
parent e8a027b229
commit 685f09a889
2 changed files with 5 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ namespace TOOHUCardAPI.Data.Services
user.KeyTotal += AppSettings.DailyKeyBonus;
user.LastDailyLoginBonus = DateTime.Now;;
await _userRepository.UpdateUser(user);
_logger.LogInformation($"User {user.SteamId} received a daily login bonus. Keys earned: {AppSettings.DailyKeyBonus}. New Key total: {user.KeyTotal}");
return user;
}
@@ -57,6 +58,7 @@ namespace TOOHUCardAPI.Data.Services
User user = await _userRepository.GetUser(steamId);
user.PetModel = petModel;
user.PetEffect = petEffect;
await _userRepository.UpdateUser(user);
_logger.LogInformation($"User {user.SteamId} saved new pet data with model: {petModel} and effect {petEffect}");
}
}