Skip to content

Commit 2f14735

Browse files
committed
fix Instance::save
1 parent 269eeac commit 2f14735

4 files changed

+22
-18
lines changed

src-tauri/.sqlx/query-3a56969af94e96f42d60d9d2fd9bcdf5bcf2d932d1eafb134ed73f3656cbb740.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/.sqlx/query-758d3c67336eecafab5fd20e4b03574995383092cdb4d7c3ebda6f933ea0f472.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

src-tauri/src/database/models/instance.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ impl Instance<Id> {
5252
{
5353
query!(
5454
"UPDATE instance SET name = $1, uuid = $2, url = $3, proxy_url = $4, username = $5, \
55-
disable_all_traffic = $6, enterprise_enabled = $7, token = $8, openid_display_name = $9 WHERE id = $10;",
55+
disable_all_traffic = $6, force_all_traffic = $7, enterprise_enabled = $8, token = $9, \
56+
openid_display_name = $10 \
57+
WHERE id = $11;",
5658
self.name,
5759
self.uuid,
5860
self.url,
5961
self.proxy_url,
6062
self.username,
6163
self.disable_all_traffic,
64+
self.force_all_traffic,
6265
self.enterprise_enabled,
6366
self.token,
6467
self.openid_display_name,
@@ -159,15 +162,16 @@ impl Instance<NoId> {
159162
let proxy_url = self.proxy_url.clone();
160163
let result = query!(
161164
"INSERT INTO instance (name, uuid, url, proxy_url, username, token, \
162-
disable_all_traffic, enterprise_enabled) \
163-
VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING id;",
165+
disable_all_traffic, force_all_traffic, enterprise_enabled) \
166+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING id;",
164167
self.name,
165168
self.uuid,
166169
url,
167170
proxy_url,
168171
self.username,
169172
self.token,
170173
self.disable_all_traffic,
174+
self.force_all_traffic,
171175
self.enterprise_enabled
172176
)
173177
.fetch_one(executor)

0 commit comments

Comments
 (0)