close #18, format
This commit is contained in:
@@ -146,9 +146,9 @@ pub async fn connect(config: &Config) -> surrealdb::Result<Surreal<Client>> {
|
||||
.await?;
|
||||
|
||||
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
|
||||
.expect("Failed to setup surreal tables.");
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user