Compare commits

...

2 Commits

Author SHA1 Message Date
85b39d472c Merge pull request 'allow m in dd' (#798) from trim-ergo into main
Some checks are pending
CI/CD Pipeline / test (push) Waiting to run
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
Reviewed-on: #798
2024-11-11 23:07:34 +01:00
50f410d9fd allow m in dd
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled
2024-11-11 23:06:53 +01:00

View File

@ -281,8 +281,13 @@ 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 == ' '); let result = data.result.trim();
let result = format_time(result); let result = if result.len() == 4 {
result.to_string()
}else{
let result = result.trim_start_matches(|c| c == '0' || c == ' ');
format_time(result)
};
sqlx::query!( sqlx::query!(
"UPDATE user SET dirty_dozen = ? where id = ?", "UPDATE user SET dirty_dozen = ? where id = ?",