rename offset property in user

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-17 08:08:57 +03:00
parent 55f4e8b3a6
commit 32cef21335
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -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; }
} }
+1 -1
View File
@@ -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