aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2023-11-23 22:31:01 +0100
committerGitHub <noreply@github.com>2023-11-23 22:31:01 +0100
commitf19492c1de848642926b63b29ce78a65ca78f421 (patch)
treef0eb21b4cf1e3ba51b2f10e8848d9092f6f90df3 /Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
parent3d4d33bcbac07be40c132cf3a3c39630ace7b444 (diff)
parentad58d1f77c2039a62b225545fb795d3395046303 (diff)
Merge pull request #10617 from barronpm/query-improvements
Query Improvements
Diffstat (limited to 'Jellyfin.Server.Implementations/Security/AuthenticationManager.cs')
-rw-r--r--Jellyfin.Server.Implementations/Security/AuthenticationManager.cs13
1 files changed, 2 insertions, 11 deletions
diff --git a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
index b2dfe60a1..07ac27e3c 100644
--- a/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
+++ b/Jellyfin.Server.Implementations/Security/AuthenticationManager.cs
@@ -58,19 +58,10 @@ namespace Jellyfin.Server.Implementations.Security
var dbContext = await _dbProvider.CreateDbContextAsync().ConfigureAwait(false);
await using (dbContext.ConfigureAwait(false))
{
- var key = await dbContext.ApiKeys
+ await dbContext.ApiKeys
.Where(apiKey => apiKey.AccessToken == accessToken)
- .FirstOrDefaultAsync()
+ .ExecuteDeleteAsync()
.ConfigureAwait(false);
-
- if (key is null)
- {
- return;
- }
-
- dbContext.Remove(key);
-
- await dbContext.SaveChangesAsync().ConfigureAwait(false);
}
}
}