From c4a08c794ccfd72980bfaabc23d937c115960719 Mon Sep 17 00:00:00 2001 From: Holly Date: Wed, 9 Oct 2024 11:27:20 +0100 Subject: [PATCH] fix register issue --- server/repos/UserRepo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/repos/UserRepo.ts b/server/repos/UserRepo.ts index 1cf12ec..e3fd807 100644 --- a/server/repos/UserRepo.ts +++ b/server/repos/UserRepo.ts @@ -57,7 +57,7 @@ export default class UserRepo { public static async insertUpdate(user:User) { if (user.Id === Number.MIN_VALUE) { - user.Id = (await Database.Instance.query("INSERT User (UserLevelId, Username, PasswordHash, PasswordSalt, HasUsedClient, CreatedByUserId, CreatedDatetime, LastModifiedByUserId, LastModifiedDatetime, DeletedByUserId, DeletedDatetime, IsDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING Id;", [ + user.Id = (await Database.Instance.query("INSERT User (UserLevelId, Username, PasswordHash, PasswordSalt, CreatedByUserId, CreatedDatetime, LastModifiedByUserId, LastModifiedDatetime, DeletedByUserId, DeletedDatetime, IsDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING Id;", [ user.UserLevel, user.Username, user.PasswordHash, user.PasswordSalt, user.CreatedByUserId, user.CreatedDatetime.getTime(), user.LastModifiedByUserId ?? null, user.LastModifiedDatetime?.getTime() ?? null, user.DeletedByUserId ?? null, user.DeletedDatetime?.getTime() ?? null, Number(user.IsDeleted) ]))[0]["Id"]; } else {