💄 Update path param

This commit is contained in:
2025-08-15 03:26:15 +08:00
parent 5bb5018cc0
commit a7e0e1e369
2 changed files with 11 additions and 5 deletions

View File

@@ -464,7 +464,9 @@ public class AccountService(
public async Task<AuthClient> UpdateDeviceName(Account account, string deviceId, string label)
{
var device = await db.AuthClients.FirstOrDefaultAsync(d => d.DeviceId == deviceId && d.AccountId == account.Id);
var device = await db.AuthClients.FirstOrDefaultAsync(
c => c.DeviceId == deviceId && c.AccountId == account.Id
);
if (device is null) throw new InvalidOperationException("Device was not found.");
device.DeviceLabel = label;
@@ -508,7 +510,9 @@ public class AccountService(
public async Task DeleteDevice(Account account, string deviceId)
{
var device = await db.AuthClients.FirstOrDefaultAsync(c => c.DeviceId == deviceId && c.AccountId == account.Id);
var device = await db.AuthClients.FirstOrDefaultAsync(
c => c.DeviceId == deviceId && c.AccountId == account.Id
);
if (device is null)
throw new InvalidOperationException("Device not found.");