@@ -34,7 +34,7 @@ func (repo *SshConfigRepo) GetSshConfig(userID uuid.UUID) (*models.SshConfig, er
34
34
35
35
func (repo * SshConfigRepo ) UpsertSshConfig (config * models.SshConfig ) (* models.SshConfig , error ) {
36
36
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 )
38
38
if err != nil {
39
39
return nil , err
40
40
}
@@ -46,7 +46,7 @@ func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.Ss
46
46
47
47
func (repo * SshConfigRepo ) UpsertSshConfigTx (config * models.SshConfig , tx pgx.Tx ) (* models.SshConfig , error ) {
48
48
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 )
50
50
if err != nil {
51
51
return nil , err
52
52
}
0 commit comments