Skip to content
Snippets Groups Projects
Commit 6174fa61 authored by Adiv's avatar Adiv
Browse files

one more fixup

parent 56460b32
No related branches found
No related tags found
No related merge requests found
...@@ -232,11 +232,11 @@ public class AuthController : BaseAuthController ...@@ -232,11 +232,11 @@ public class AuthController : BaseAuthController
[HttpPost("ResendConfirmEmail")] [HttpPost("ResendConfirmEmail")]
[SwaggerResponse(204)] [SwaggerResponse(204)]
[SwaggerResponse(400, Type = typeof(ResponseEnvelope<BadRequestObjectResult>))] [SwaggerResponse(400, Type = typeof(ResponseEnvelope<BadRequestObjectResult>))]
public async Task<ActionResult> ResendConfirmEmail(string callbackUrl) public async Task<ActionResult> ResendConfirmEmail()
{ {
try try
{ {
await _authService.ResendConfirmEmail(UserId, callbackUrl); await _authService.ResendConfirmEmail(UserId);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -22,7 +22,7 @@ public interface IAuthService ...@@ -22,7 +22,7 @@ public interface IAuthService
Task SetPassword(SetPasswordRequestDTO request); Task SetPassword(SetPasswordRequestDTO request);
Task ChangePassword(int userId, ChangePasswordRequestDTO request); Task ChangePassword(int userId, ChangePasswordRequestDTO request);
Task ChangeEmail(int userId, ChangeEmailRequestDTO request); Task ChangeEmail(int userId, ChangeEmailRequestDTO request);
Task ResendConfirmEmail(int userId, string callbackUrl); Task ResendConfirmEmail(int userId);
Task ConfirmEmailAddress(int userId, string token); Task ConfirmEmailAddress(int userId, string token);
Task Logout(int userId); Task Logout(int userId);
} }
...@@ -140,7 +140,7 @@ public class AuthService : IAuthService ...@@ -140,7 +140,7 @@ public class AuthService : IAuthService
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
} }
public async Task ResendConfirmEmail(int userId, string callbackUrl) public async Task ResendConfirmEmail(int userId)
{ {
var user = await _context.User.FirstOrDefaultAsync(u => u.Id == userId); var user = await _context.User.FirstOrDefaultAsync(u => u.Id == userId);
if (user?.EmailConfirmationToken == null) if (user?.EmailConfirmationToken == null)
......
...@@ -31,7 +31,7 @@ public class EmailService : IEmailService ...@@ -31,7 +31,7 @@ public class EmailService : IEmailService
email.From.Add(new MailboxAddress("aa03980", "smtp.gmail.com")); email.From.Add(new MailboxAddress("aa03980", "smtp.gmail.com"));
email.To.Add(new MailboxAddress(emailDTO.Receiver, emailDTO.To)); email.To.Add(new MailboxAddress(emailDTO.Receiver, emailDTO.To));
email.Subject = emailDTO.Subject; email.Subject = emailDTO.Subject;
email.Body = new TextPart(TextFormat.Text) {Text = emailDTO.Body}; email.Body = new TextPart(TextFormat.Html) {Text = emailDTO.Body};
using var smtp = new SmtpClient(); using var smtp = new SmtpClient();
try try
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"Email": "", "Email": "",
"Password": "" "Password": ""
}, },
"Group17Website": { "FrontendStrings": {
"BaseUrl": "" "BaseUrl": ""
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment