mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix: save download client json settings (#79)
This commit is contained in:
parent
2daeedbdc7
commit
d3c0b32199
1 changed files with 4 additions and 4 deletions
|
@ -157,7 +157,7 @@ func (r *DownloadClientRepo) Store(client domain.DownloadClient) (*domain.Downlo
|
||||||
ssl = ?,
|
ssl = ?,
|
||||||
username = ?,
|
username = ?,
|
||||||
password = ?,
|
password = ?,
|
||||||
settings = json_set(?)
|
settings = (?)
|
||||||
WHERE
|
WHERE
|
||||||
id = ?`,
|
id = ?`,
|
||||||
client.Name,
|
client.Name,
|
||||||
|
@ -168,7 +168,7 @@ func (r *DownloadClientRepo) Store(client domain.DownloadClient) (*domain.Downlo
|
||||||
client.SSL,
|
client.SSL,
|
||||||
client.Username,
|
client.Username,
|
||||||
client.Password,
|
client.Password,
|
||||||
settingsJson,
|
string(settingsJson),
|
||||||
client.ID,
|
client.ID,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -189,7 +189,7 @@ func (r *DownloadClientRepo) Store(client domain.DownloadClient) (*domain.Downlo
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
settings)
|
settings)
|
||||||
VALUES (?, ?, ?, ?, ?, ? , ?, ?, json_set(?)) ON CONFLICT DO NOTHING`,
|
VALUES (?, ?, ?, ?, ?, ? , ?, ?, ?) ON CONFLICT DO NOTHING`,
|
||||||
client.Name,
|
client.Name,
|
||||||
client.Type,
|
client.Type,
|
||||||
client.Enabled,
|
client.Enabled,
|
||||||
|
@ -198,7 +198,7 @@ func (r *DownloadClientRepo) Store(client domain.DownloadClient) (*domain.Downlo
|
||||||
client.SSL,
|
client.SSL,
|
||||||
client.Username,
|
client.Username,
|
||||||
client.Password,
|
client.Password,
|
||||||
settingsJson,
|
string(settingsJson),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Stack().Err(err).Msgf("could not store new download client: %v", client)
|
log.Error().Stack().Err(err).Msgf("could not store new download client: %v", client)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue