close #18, format

This commit is contained in:
2025-10-09 21:52:06 -06:00
parent 5ade5e36df
commit b0fe7f4761
2 changed files with 4 additions and 2 deletions

View File

@@ -146,9 +146,9 @@ pub async fn connect(config: &Config) -> surrealdb::Result<Surreal<Client>> {
.await?; .await?;
let setup = include_bytes!("setup.surql"); let setup = include_bytes!("setup.surql");
let file = setup.iter().map(|c| *c as char).collect::<String>(); let init_commands = setup.iter().map(|c| *c as char).collect::<String>();
db.query(file) db.query(init_commands)
.await .await
.expect("Failed to setup surreal tables."); .expect("Failed to setup surreal tables.");

View File

@@ -14,3 +14,5 @@ DEFINE FUNCTION OVERWRITE fn::get_next($filter: string) {
UPDATE $site.id SET processing = true; UPDATE $site.id SET processing = true;
RETURN $site RETURN $site
}; };
UPDATE website SET processing = false WHERE processing = true;