Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
therealpaulgg committed Nov 13, 2024
1 parent 210fd68 commit ff41b9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/database/repository/ssh_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit ff41b9b

Please sign in to comment.