public async Task SignUpPlayer(SignUpPlayerModel model)
        {
            var suModel = new SignUpModel()
            {
                Username = model.Username,
                Password = model.Password,
                Role     = Role.Player.ToString()
            };
            var id = await SignUp(suModel);

            var @event = new PlayerCreatedEvent()
            {
                PlayerId  = id,
                Name      = model.Name,
                Surname   = model.Surname,
                Age       = model.Age,
                LevelName = model.LevelName
            };

            await _publisher.PublishAsync(@event);
        }
Beispiel #2
0
        public async Task <IActionResult> SignUpPlayer([FromBody] SignUpPlayerModel model)
        {
            await _identityService.SignUpPlayer(model);

            return(NoContent());
        }