Skip to content

Commit ff41b9b

Browse files
committed
oops
1 parent 210fd68 commit ff41b9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/database/repository/ssh_config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (repo *SshConfigRepo) GetSshConfig(userID uuid.UUID) (*models.SshConfig, er
3434

3535
func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.SshConfig, error) {
3636
q := do.MustInvoke[query.QueryService[models.SshConfig]](repo.Injector)
37-
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)
37+
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)
3838
if err != nil {
3939
return nil, err
4040
}
@@ -46,7 +46,7 @@ func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.Ss
4646

4747
func (repo *SshConfigRepo) UpsertSshConfigTx(config *models.SshConfig, tx pgx.Tx) (*models.SshConfig, error) {
4848
q := do.MustInvoke[query.QueryServiceTx[models.SshConfig]](repo.Injector)
49-
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)
49+
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)
5050
if err != nil {
5151
return nil, err
5252
}

0 commit comments

Comments
 (0)