mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Don't AddAsync
This commit is contained in:
parent
6cbfae209d
commit
941f326c0b
@ -216,7 +216,7 @@ namespace Jellyfin.Server.Implementations.Users
|
|||||||
|
|
||||||
var newUser = await CreateUserInternalAsync(name, dbContext).ConfigureAwait(false);
|
var newUser = await CreateUserInternalAsync(name, dbContext).ConfigureAwait(false);
|
||||||
|
|
||||||
await dbContext.Users.AddAsync(newUser).ConfigureAwait(false);
|
dbContext.Users.Add(newUser);
|
||||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
OnUserCreated?.Invoke(this, new GenericEventArgs<User>(newUser));
|
OnUserCreated?.Invoke(this, new GenericEventArgs<User>(newUser));
|
||||||
@ -608,7 +608,7 @@ namespace Jellyfin.Server.Implementations.Users
|
|||||||
newUser.SetPermission(PermissionKind.EnableContentDeletion, true);
|
newUser.SetPermission(PermissionKind.EnableContentDeletion, true);
|
||||||
newUser.SetPermission(PermissionKind.EnableRemoteControlOfOtherUsers, true);
|
newUser.SetPermission(PermissionKind.EnableRemoteControlOfOtherUsers, true);
|
||||||
|
|
||||||
await dbContext.Users.AddAsync(newUser).ConfigureAwait(false);
|
dbContext.Users.Add(newUser);
|
||||||
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
await dbContext.SaveChangesAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user