Use consistent name for db context

This commit is contained in:
Patrick Barron 2021-06-18 17:09:59 -04:00
parent 4206c0e091
commit 0292936c65
1 changed files with 4 additions and 4 deletions

View File

@ -117,8 +117,8 @@ namespace Jellyfin.Server.Implementations.Security
#pragma warning restore CA1508
authInfo.HasToken = true;
await using var jellyfinDb = _jellyfinDbProvider.CreateContext();
var device = await jellyfinDb.Devices.FirstOrDefaultAsync(d => d.AccessToken == token).ConfigureAwait(false);
await using var dbContext = _jellyfinDbProvider.CreateContext();
var device = await dbContext.Devices.FirstOrDefaultAsync(d => d.AccessToken == token).ConfigureAwait(false);
if (device != null)
{
@ -183,8 +183,8 @@ namespace Jellyfin.Server.Implementations.Security
if (updateToken)
{
jellyfinDb.Devices.Update(device);
await jellyfinDb.SaveChangesAsync().ConfigureAwait(false);
dbContext.Devices.Update(device);
await dbContext.SaveChangesAsync().ConfigureAwait(false);
}
}