public object SetFreezeStatus(FreezeData data) { if (data.Freeze) { _commands.FreezeAccount(data.PlayerId); } else { _commands.UnfreezeAccount(data.PlayerId); } return(Ok(new { Result = "success" })); }
public void Consume(PlayerRegistrationChecked message) { var player = _playerRepository.Players.FirstOrDefault(x => x.Id == message.PlayerId); if (player == null) { return; } if (message.Action == SystemAction.FreezeAccount) { _playerCommands.FreezeAccount(player.Id); } if (message.Action == SystemAction.Deactivate) { _playerCommands.SetStatus(player.Id, false); } if (message.Action == SystemAction.NoAction) { _playerCommands.SetStatus(player.Id, true); } }