Psgl auth db (#1095)

* feat(cdk-mintd): add dedicated auth database configuration support
This commit is contained in:
thesimplekid
2025-09-21 16:56:12 +01:00
committed by GitHub
parent 075e25682e
commit df2f9d1c2a
9 changed files with 137 additions and 10 deletions

View File

@@ -198,9 +198,11 @@ where
for (endpoint, auth) in protected_endpoints.iter() {
if let Err(err) = query(
r#"
INSERT OR REPLACE INTO protected_endpoints
INSERT INTO protected_endpoints
(endpoint, auth)
VALUES (:endpoint, :auth);
VALUES (:endpoint, :auth)
ON CONFLICT (endpoint) DO UPDATE SET
auth = EXCLUDED.auth;
"#,
)?
.bind("endpoint", serde_json::to_string(endpoint)?)