Compare commits
2 Commits
cb62df81e2
...
a46de4662c
| Author | SHA1 | Date | |
|---|---|---|---|
|
a46de4662c
|
|||
|
fdd14b860e
|
@@ -107,7 +107,6 @@ public class AccountController(
|
|||||||
|
|
||||||
public class AccountCreateValidateRequest
|
public class AccountCreateValidateRequest
|
||||||
{
|
{
|
||||||
[Required]
|
|
||||||
[MinLength(2)]
|
[MinLength(2)]
|
||||||
[MaxLength(256)]
|
[MaxLength(256)]
|
||||||
[RegularExpression(@"^[A-Za-z0-9_-]+$",
|
[RegularExpression(@"^[A-Za-z0-9_-]+$",
|
||||||
@@ -117,7 +116,6 @@ public class AccountController(
|
|||||||
|
|
||||||
[EmailAddress]
|
[EmailAddress]
|
||||||
[RegularExpression(@"^[^+]+@[^@]+\.[^@]+$", ErrorMessage = "Email address cannot contain '+' symbol.")]
|
[RegularExpression(@"^[^+]+@[^@]+\.[^@]+$", ErrorMessage = "Email address cannot contain '+' symbol.")]
|
||||||
[Required]
|
|
||||||
[MaxLength(1024)]
|
[MaxLength(1024)]
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public class WebSocketController(
|
|||||||
var accountId = Guid.Parse(currentUser.Id!);
|
var accountId = Guid.Parse(currentUser.Id!);
|
||||||
var deviceId = currentSession.Challenge?.DeviceId ?? Guid.NewGuid().ToString();
|
var deviceId = currentSession.Challenge?.DeviceId ?? Guid.NewGuid().ToString();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(deviceId))
|
// TODO temporary fix due to the server update
|
||||||
return BadRequest("Unable to get device ID from session.");
|
if (string.IsNullOrEmpty(deviceId)) deviceId = Guid.NewGuid().ToString().Replace("-", "");
|
||||||
if (deviceAlt is not null)
|
if (deviceAlt is not null)
|
||||||
deviceId = $"{deviceId}+{deviceAlt}";
|
deviceId = $"{deviceId}+{deviceAlt}";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user