diff --git a/pkg/database/repository/ssh_config.go b/pkg/database/repository/ssh_config.go index 5ee2cb2..fdec728 100644 --- a/pkg/database/repository/ssh_config.go +++ b/pkg/database/repository/ssh_config.go @@ -34,7 +34,7 @@ func (repo *SshConfigRepo) GetSshConfig(userID uuid.UUID) (*models.SshConfig, er func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.SshConfig, error) { q := do.MustInvoke[query.QueryService[models.SshConfig]](repo.Injector) - sshConfig, err := q.QueryOne("insert into ssh_configs (user_id, host, values, identity_files) values ($1, $2, $3, $4, $5) on conflict (user_id, host) do update set host = $3, values = $4, identity_files = $5 returning *", config.UserID, config.Host, config.Values, config.IdentityFiles) + sshConfig, err := q.QueryOne("insert into ssh_configs (user_id, host, values, identity_files) values ($1, $2, $3, $4) on conflict (user_id, host) do update set host = $2, values = $3, identity_files = $4 returning *", config.UserID, config.Host, config.Values, config.IdentityFiles) if err != nil { return nil, err } @@ -46,7 +46,7 @@ func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.Ss func (repo *SshConfigRepo) UpsertSshConfigTx(config *models.SshConfig, tx pgx.Tx) (*models.SshConfig, error) { q := do.MustInvoke[query.QueryServiceTx[models.SshConfig]](repo.Injector) - sshConfig, err := q.QueryOne(tx, "insert into ssh_configs (user_id, host, values, identity_files) values ($1, $2, $3, $4, $5) on conflict (user_id, host) do update set host = $3, values = $4, identity_files = $5 returning *", config.UserID, config.Host, config.Values, config.IdentityFiles) + sshConfig, err := q.QueryOne(tx, "insert into ssh_configs (user_id, host, values, identity_files) values ($1, $2, $3, $4) on conflict (user_id, host) do update set host = $2, values = $3, identity_files = $4 returning *", config.UserID, config.Host, config.Values, config.IdentityFiles) if err != nil { return nil, err }