Skip to content

Commit 39bfd81

Browse files
committed
Make activation email point to next. frontend
1 parent 04e09d8 commit 39bfd81

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

API/Services/Account/AccountService.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Net.Mail;
22
using Microsoft.EntityFrameworkCore;
3-
using Microsoft.Extensions.Options;
43
using Npgsql;
54
using OneOf;
65
using OneOf.Types;
@@ -118,8 +117,8 @@ public async Task<OneOf<Success<User>, AccountWithEmailOrUsernameExists>> Create
118117

119118
await _db.SaveChangesAsync();
120119

121-
await _emailService.VerifyEmail(new Contact(email, username),
122-
new Uri(_frontendConfig.BaseUrl, $"/#/account/activate/{user.Id}/{token}"));
120+
await _emailService.ActivateAccount(new Contact(email, username),
121+
new Uri($"https://next.openshock.app/activate?token={token}"));
123122
return new Success<User>(user);
124123
}
125124

@@ -192,12 +191,12 @@ public async Task<OneOf<Success<User>, AccountWithEmailOrUsernameExists>> Create
192191

193192
await tx.CommitAsync();
194193

195-
// Send verification email only after successful commit
194+
// Send verification email only after a successful commit
196195
if (!isEmailTrusted && activationToken is not null)
197196
{
198-
await _emailService.VerifyEmail(
197+
await _emailService.ActivateAccount(
199198
new Contact(email, username),
200-
new Uri(_frontendConfig.BaseUrl, $"/#/account/activate/{user.Id}/{activationToken}")
199+
new Uri($"https://next.openshock.app/activate?token={activationToken}")
201200
);
202201
}
203202

0 commit comments

Comments
 (0)