mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 08:56:33 +00:00
rename offset property in user
This commit is contained in:
@@ -16,12 +16,12 @@ public class User
|
|||||||
|
|
||||||
public class UserConfig
|
public class UserConfig
|
||||||
{
|
{
|
||||||
public UserQueueOffsets? QueueConfig { get; set; } = new();
|
public UserQueueOffsets? QueueOffsets { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UserQueueOffsets
|
public class UserQueueOffsets
|
||||||
{
|
{
|
||||||
public int AnnotationsOffset { get; set; }
|
public ulong AnnotationsOffset { get; set; }
|
||||||
public int AnnotationsConfirmOffset { get; set; }
|
public ulong AnnotationsConfirmOffset { get; set; }
|
||||||
public int AnnotationsCommandsOffset { get; set; }
|
public ulong AnnotationsCommandsOffset { get; set; }
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ public class UserService(IDbFactory dbFactory, ICache cache) : IUserService
|
|||||||
{
|
{
|
||||||
var userConfig = await db.Users.Where(x => x.Email == email).Select(x => x.UserConfig).FirstOrDefaultAsync(token: cancellationToken);
|
var userConfig = await db.Users.Where(x => x.Email == email).Select(x => x.UserConfig).FirstOrDefaultAsync(token: cancellationToken);
|
||||||
userConfig ??= new UserConfig();
|
userConfig ??= new UserConfig();
|
||||||
userConfig.QueueConfig = queueOffsets;
|
userConfig.QueueOffsets = queueOffsets;
|
||||||
|
|
||||||
await db.Users.UpdateAsync(x => x.Email == email,
|
await db.Users.UpdateAsync(x => x.Email == email,
|
||||||
u => new User
|
u => new User
|
||||||
|
|||||||
Reference in New Issue
Block a user