mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Optimize EF Core queries and remove unnecessary AsQueryable calls
This commit is contained in:
@@ -40,7 +40,6 @@ namespace Jellyfin.Server.Implementations.Security
|
||||
await using (dbContext.ConfigureAwait(false))
|
||||
{
|
||||
return await dbContext.ApiKeys
|
||||
.AsAsyncEnumerable()
|
||||
.Select(key => new AuthenticationInfo
|
||||
{
|
||||
AppName = key.Name,
|
||||
@@ -60,7 +59,6 @@ namespace Jellyfin.Server.Implementations.Security
|
||||
await using (dbContext.ConfigureAwait(false))
|
||||
{
|
||||
var key = await dbContext.ApiKeys
|
||||
.AsQueryable()
|
||||
.Where(apiKey => apiKey.AccessToken == accessToken)
|
||||
.FirstOrDefaultAsync()
|
||||
.ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user