Authorized device

This commit is contained in:
2025-08-14 02:21:59 +08:00
parent 5f70d53c94
commit 1778ab112d
5 changed files with 11 additions and 5 deletions

View File

@@ -105,6 +105,7 @@ public class AuthService(
public async Task<AuthClient> GetOrCreateDeviceAsync(
Guid accountId,
string deviceId,
string? deviceName = null,
ClientPlatform platform = ClientPlatform.Unidentified
)
{
@@ -116,6 +117,7 @@ public class AuthService(
DeviceId = deviceId,
AccountId = accountId
};
if (deviceName is not null) device.DeviceName = deviceName;
db.AuthClients.Add(device);
await db.SaveChangesAsync();