Update Account DbService
Docker Build and Release Upload / build (push) Failing after 58s

This commit is contained in:
2025-07-13 20:25:33 -07:00
parent ddf78e5606
commit 00f245ccef
7 changed files with 8 additions and 607 deletions
@@ -35,6 +35,7 @@ namespace BoredCareers.Services.DatabaseService {
int _curpasswordattempts = reader.GetInt32( "CurrentPasswordAttempts" );
string _role = reader.GetString( "Role" );
string _emailtoken = reader.GetString( "EmailToken" );
string _dataserver = reader.GetString( "DataServer" );
account = new Account() {
ID = _id,
@@ -47,6 +48,7 @@ namespace BoredCareers.Services.DatabaseService {
EmailToken = _emailtoken,
FailedPasswordLock = _failedpasswordlock,
Role = _role,
DataServer = _dataserver
};
}
}
@@ -82,6 +84,7 @@ namespace BoredCareers.Services.DatabaseService {
int _curpasswordattempts = reader.GetInt32( "CurrentPasswordAttempts" );
string _role = reader.GetString( "Role" );
string _emailtoken = reader.GetString( "EmailToken" );
string _dataserver = reader.GetString("DataServer");
account = new Account() {
ID = _id,
@@ -94,6 +97,7 @@ namespace BoredCareers.Services.DatabaseService {
EmailToken = _emailtoken,
FailedPasswordLock = _failedpasswordlock,
Role = _role,
DataServer = _dataserver
};
}
}
@@ -107,9 +111,9 @@ namespace BoredCareers.Services.DatabaseService {
string command = @"
INSERT INTO Account
(ID,UserName,Email,EmailVerified,PasswordHash,FailedPasswordLock,PasswordAttempts,CurrentPasswordAttempts,Role,EmailToken)
(ID,UserName,Email,EmailVerified,PasswordHash,FailedPasswordLock,PasswordAttempts,CurrentPasswordAttempts,Role,EmailToken,DataServer)
VALUES
(@ID,@UserName,@Email,@EmailVerified,@PasswordHash,@FailedPasswordLock,@PasswordAttempts,@CurrentPasswordAttempts,@Role,@EmailToken);
(@ID,@UserName,@Email,@EmailVerified,@PasswordHash,@FailedPasswordLock,@PasswordAttempts,@CurrentPasswordAttempts,@Role,@EmailToken,@DataServer);
ON DUPLICATE KEY UPDATE
UserName = @UserName,
Email = @Email,
@@ -120,6 +124,7 @@ namespace BoredCareers.Services.DatabaseService {
CurrentPasswordAttempts = @CurrentPasswordAttempts,
Role = @Role,
EmailToken = @EmailToken;
DataServer = @DataServer;
";
MySqlCommand cmd = new MySqlCommand( command , connection);
@@ -133,6 +138,7 @@ namespace BoredCareers.Services.DatabaseService {
cmd.Parameters.AddWithValue("@CurrentPasswordAttempts", Profile.CurrentPasswordAttempts);
cmd.Parameters.AddWithValue("@Role", Profile.Role);
cmd.Parameters.AddWithValue("@EmailToken", Profile.EmailToken);
cmd.Parameters.AddWithValue("@DataServer", Profile.DataServer);
await cmd.ExecuteNonQueryAsync();
}
@@ -145,9 +151,6 @@ namespace BoredCareers.Services.DatabaseService {
string command = @"
DELETE FROM Account WHERE ID = @ID;
DELETE FROM AccountInventory WHERE AccountID = @ID;
DELETE FROM ProjectMistData WHERE AccountID = @ID;
DELETE FROM Cart WHERE AccountID = @ID;
";
cmd = new MySqlCommand( command, connection );
cmd.Parameters.AddWithValue("@ID", ID);