mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Fix SA 1116 warnings
This commit is contained in:
@@ -54,7 +54,8 @@ namespace Emby.Server.Implementations.Security
|
||||
{
|
||||
if (tableNewlyCreated && TableExists(connection, "AccessTokens"))
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
var existingColumnNames = GetColumnNames(db, "AccessTokens");
|
||||
|
||||
@@ -88,7 +89,8 @@ namespace Emby.Server.Implementations.Security
|
||||
|
||||
using (var connection = GetConnection())
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
using (var statement = db.PrepareStatement("insert into Tokens (AccessToken, DeviceId, AppName, AppVersion, DeviceName, UserId, UserName, IsActive, DateCreated, DateLastActivity) values (@AccessToken, @DeviceId, @AppName, @AppVersion, @DeviceName, @UserId, @UserName, @IsActive, @DateCreated, @DateLastActivity)"))
|
||||
{
|
||||
@@ -119,7 +121,8 @@ namespace Emby.Server.Implementations.Security
|
||||
|
||||
using (var connection = GetConnection())
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
using (var statement = db.PrepareStatement("Update Tokens set AccessToken=@AccessToken, DeviceId=@DeviceId, AppName=@AppName, AppVersion=@AppVersion, DeviceName=@DeviceName, UserId=@UserId, UserName=@UserName, DateCreated=@DateCreated, DateLastActivity=@DateLastActivity where Id=@Id"))
|
||||
{
|
||||
@@ -151,7 +154,8 @@ namespace Emby.Server.Implementations.Security
|
||||
|
||||
using (var connection = GetConnection())
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
using (var statement = db.PrepareStatement("Delete from Tokens where Id=@Id"))
|
||||
{
|
||||
@@ -346,7 +350,8 @@ namespace Emby.Server.Implementations.Security
|
||||
{
|
||||
using (var connection = GetConnection(true))
|
||||
{
|
||||
return connection.RunInTransaction(db =>
|
||||
return connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
using (var statement = base.PrepareStatement(db, "select CustomName from Devices where Id=@DeviceId"))
|
||||
{
|
||||
@@ -377,7 +382,8 @@ namespace Emby.Server.Implementations.Security
|
||||
|
||||
using (var connection = GetConnection())
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
using (var statement = db.PrepareStatement("replace into devices (Id, CustomName, Capabilities) VALUES (@Id, @CustomName, (Select Capabilities from Devices where Id=@Id))"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user