fix: fix potential duplicates when creating a system

This commit is contained in:
Suya1671 2025-07-20 00:46:06 +02:00
parent 7a49b66338
commit e3911cc4a5
No known key found for this signature in database

View file

@ -85,6 +85,7 @@ impl System {
r#"
INSERT INTO system_oauth_process (owner_id, csrf)
VALUES ($1, $2)
ON CONFLICT (owner_id) DO UPDATE SET csrf = $2
"#,
system.owner_id,
secret
@ -204,6 +205,7 @@ impl System {
r#"
INSERT INTO system_oauth_process (owner_id, csrf)
VALUES ($1, $2)
ON CONFLICT (owner_id) DO UPDATE SET csrf = $2
"#,
user_id.id,
secret