From b0fe7f4761561a92ba98cd4e8b247965710dfdea Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 9 Oct 2025 21:52:06 -0600 Subject: [PATCH] close #18, format --- src/db.rs | 4 ++-- src/setup.surql | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/db.rs b/src/db.rs index f7c01ff..22ddb10 100644 --- a/src/db.rs +++ b/src/db.rs @@ -146,9 +146,9 @@ pub async fn connect(config: &Config) -> surrealdb::Result> { .await?; let setup = include_bytes!("setup.surql"); - let file = setup.iter().map(|c| *c as char).collect::(); + let init_commands = setup.iter().map(|c| *c as char).collect::(); - db.query(file) + db.query(init_commands) .await .expect("Failed to setup surreal tables."); diff --git a/src/setup.surql b/src/setup.surql index ab3d387..abcf3ba 100644 --- a/src/setup.surql +++ b/src/setup.surql @@ -14,3 +14,5 @@ DEFINE FUNCTION OVERWRITE fn::get_next($filter: string) { UPDATE $site.id SET processing = true; RETURN $site }; + +UPDATE website SET processing = false WHERE processing = true;