diff --git a/MBS-COMMAND.API/Program.cs b/MBS-COMMAND.API/Program.cs index 2a83c48..e35b946 100644 --- a/MBS-COMMAND.API/Program.cs +++ b/MBS-COMMAND.API/Program.cs @@ -78,6 +78,7 @@ // Add Middleware => Remember using middleware builder.Services.AddTransient(); builder.Services.AddTransient(); + builder.Services.AddHttpContextAccessor(); var app = builder.Build(); diff --git a/MBS_COMMAND.Application/UserCases/Commands/MentorSkills/CreateMentorSkillsCommandHandler.cs b/MBS_COMMAND.Application/UserCases/Commands/MentorSkills/CreateMentorSkillsCommandHandler.cs index c314b6e..cd2942d 100644 --- a/MBS_COMMAND.Application/UserCases/Commands/MentorSkills/CreateMentorSkillsCommandHandler.cs +++ b/MBS_COMMAND.Application/UserCases/Commands/MentorSkills/CreateMentorSkillsCommandHandler.cs @@ -60,14 +60,14 @@ public async Task Handle(Command.CreateMentorSkillsCommand request, Canc _cetificateRepository.AddRange(certificates); - // mentorSkill.CreateMentor(mentor); + mentorSkill.CreateMentorSkills(mentor.Id, skill, certificates); - await _mailService.SendMail(new MailContent() - { - Body = "DITME MAY NGHI", - Subject = "XIN CHAO QUY KHACH", - To = "tan182205@gmail.com" - }); + // await _mailService.SendMail(new MailContent() + // { + // Body = "DITME MAY NGHI", + // Subject = "XIN CHAO QUY KHACH", + // To = "tan182205@gmail.com" + // }); // await _mailService.SendMail(EmailExtensions.ForgotPasswordBody("randomNumber", $"USERNAME", "request.Email"));