even easier new user email
This commit is contained in:
parent
6723108e48
commit
009672b81a
|
@ -24,13 +24,13 @@ jobs:
|
|||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "$SSH_KEY" > ~/.ssh/staging.key
|
||||
chmod 600 ~/.ssh/staging.key
|
||||
echo "$SSH_KEY" > ~/.ssh/staging.pub
|
||||
chmod 600 ~/.ssh/staging.pub
|
||||
cat >>~/.ssh/config <<END
|
||||
Host staging
|
||||
HostName $SSH_HOST
|
||||
User $SSH_USER
|
||||
IdentityFile ~/.ssh/staging.key
|
||||
IdentityFile ~/.ssh/staging.pub
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
env:
|
||||
|
|
|
@ -490,13 +490,7 @@ public class Controller : ControllerBase
|
|||
return Unauthorized();
|
||||
}
|
||||
// Console.WriteLine("HELP");
|
||||
return Redirect($"https://monitor.innov.energy/?username={user.Email}");
|
||||
}
|
||||
|
||||
[HttpGet(nameof(NewUserLogin))]
|
||||
public ActionResult<Object> NewUserLogin(String email)
|
||||
{
|
||||
return Redirect($"https://monitor.innov.energy/?username={email}");
|
||||
return Redirect($"https://monitor.innov.energy/?username={user.Email}&reset=true");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public static class Email
|
|||
var config = JsonSerializer.Deserialize<SmtpConfig>(File.OpenRead("./Resources/smtpConfig.json"))!;
|
||||
|
||||
//todo am I right?
|
||||
const String resetLink = "https://monitor.innov.energy/api/NewUserLogin";
|
||||
var resetLink = $"https://monitor.innov.energy/?username={emailRecipientUser.Email}";
|
||||
var mailer = new Mailer();
|
||||
|
||||
try
|
||||
|
@ -71,8 +71,7 @@ public static class Email
|
|||
mailer.Subject("Your new Innovenergy-Account");
|
||||
mailer.Body("Dear " + emailRecipientUser.Name
|
||||
+ "\n To set your password and log in to your Innovenergy-Account open this link:"
|
||||
+ resetLink + "?email="
|
||||
+ emailRecipientUser.Email);
|
||||
+ resetLink);
|
||||
|
||||
return mailer.SendEmailUsingSmtpConfig(config);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue