trim ergo entries
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m41s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
Philipp Hofer 2024-11-11 22:45:32 +01:00
parent d76ce744f1
commit 88c6469154

View File

@ -210,9 +210,11 @@ async fn new_thirty(
eprintln!("Failed to persist file: {:?}", e); eprintln!("Failed to persist file: {:?}", e);
} }
let result = data.result.trim_start_matches(|c| c == '0' || c == ' ');
sqlx::query!( sqlx::query!(
"UPDATE user SET dirty_thirty = ? where id = ?", "UPDATE user SET dirty_thirty = ? where id = ?",
data.result, result,
data.user data.user
) )
.execute(db.inner()) .execute(db.inner())
@ -253,10 +255,11 @@ async fn new_dozen(
if let Err(e) = data.proof.move_copy_to(file_path).await { if let Err(e) = data.proof.move_copy_to(file_path).await {
eprintln!("Failed to persist file: {:?}", e); eprintln!("Failed to persist file: {:?}", e);
} }
let result = data.result.trim_start_matches(|c| c == '0' || c == ' ');
sqlx::query!( sqlx::query!(
"UPDATE user SET dirty_dozen = ? where id = ?", "UPDATE user SET dirty_dozen = ? where id = ?",
data.result, result,
data.user data.user
) )
.execute(db.inner()) .execute(db.inner())