public IActionResult JoinTeam([FromBody] TeamJoinDto model)
        {
            var result = _teamRepository.GetTeamById(model.TeamId);

            if (result != null)
            {
                if (result.EventId == model.EventId && result.Password == model.Password) //TODO team max
                {
                    var userName = User.Identity.Name;
                    var user     = _userRepository.GetUserByEmail(userName);
                    _teamRepository.AddMememberToTeam(model.TeamId, user.Result);
                    return(Ok(new MessageDto("Succesfull")));
                }
            }
            return(BadRequest(_apiErrorHandler.GenerateErrorDto(new ErrorList("Invalid data"))));
        }