Skip to content

Commit 460729f

Browse files
committed
fix(federation): use $N placeholders instead of ? for PostgreSQL AnyPool compatibility
1 parent 4433bfd commit 460729f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/nexus-federation/src/key_manager.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,14 @@ impl KeyManager {
7474
sqlx::query(
7575
"INSERT INTO federation_keys \
7676
(key_id, seed_bytes, public_key_b64, expires_at, is_active) \
77-
VALUES (?, ?, ?, ?, TRUE) \
77+
VALUES ($1, $2, $3, $4, $5) \
7878
ON CONFLICT (key_id) DO NOTHING",
7979
)
8080
.bind(&kp.key_id)
8181
.bind(kp.seed_bytes().to_vec())
8282
.bind(kp.public_key_base64())
8383
.bind(expires_at.to_rfc3339())
84+
.bind(true)
8485
.execute(&self.pool)
8586
.await
8687
.map_err(|e| FederationError::Other(anyhow!(e)))?;

0 commit comments

Comments
 (0)