public async Task SignUpCoach(SignUpCoachModel model) { var suModel = new SignUpModel() { Username = model.Username, Password = model.Password, Role = Role.Coach.ToString() }; var id = await SignUp(suModel); var @event = new CoachCreatedEvent() { CoachId = id, Name = model.Name, Surname = model.Surname }; await _publisher.PublishAsync(@event); }
public async Task <IActionResult> SignUpCoach([FromBody] SignUpCoachModel model) { await _identityService.SignUpCoach(model); return(NoContent()); }