this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

debug car upload with example script

phil 465337a2 e0ce3751

+26 -6
+1 -1
shared/challenges_markdown/three/part_one.md
··· 10 10 11 11 <a id="download-car" href="" class="btn btn-primary btn-disabled">Loading (JS required) &hellip;</a> 12 12 13 - Your challenge: **find the `verification_code` hidden inside**. 13 + Your challenge: **find the `verificationCode` hidden inside**. 14 14 15 15 <details> 16 16 <summary>Hint: atproto CAR tools (easy-mode)</summary>
+1 -1
shared/challenges_markdown/three/part_two.md
··· 5 5 the inspection will check for: 6 6 7 7 - **Collection:** `codes.advent.challenge.day` 8 - - **Record key:** `3` 8 + - **Record key:** `three` 9 9 - **Field:** `verificationCode` set to `{{code}}` 10 10 11 11 any valid DID will do for the commit, and the signature won't be checked
+20
shared/examples/day_three_inspect_car.rs
··· 1 + use shared::advent::challenges::day_three::repo::inspect_car; 2 + 3 + #[tokio::main] 4 + async fn main() -> Result<(), Box<dyn std::error::Error>> { 5 + let path = std::env::args() 6 + .nth(1) 7 + .ok_or("usage: day_three_inspect_car <path-to-car-file>")?; 8 + 9 + let car_bytes = std::fs::read(&path)?; 10 + 11 + let record = inspect_car( 12 + &car_bytes, 13 + &("codes.advent.challenge.day".parse().unwrap()), 14 + &("three".parse().unwrap()), 15 + ).await?; 16 + 17 + println!("{record:#?}"); 18 + 19 + Ok(()) 20 + }
+4 -4
web/src/handlers/custom/day_three.rs
··· 67 67 let res = shared::advent::challenges::day_three::repo::inspect_car( 68 68 &car_bytes, 69 69 &("codes.advent.challenge.day".parse().unwrap()), 70 - &("3".parse().unwrap()), 70 + &("three".parse().unwrap()), 71 71 ) 72 72 .await; 73 73 ··· 78 78 set_flash_message( 79 79 &mut session, 80 80 "part_two_result", 81 - FlashMessage::Error( 82 - "Sorry, but your car failed inspection.".into() 83 - ), 81 + FlashMessage::Error(format!( 82 + "Sorry, but your car failed inspection: {e}" 83 + )), 84 84 ) 85 85 .await 86 86 .map_err(log_and_respond(StatusCode::INTERNAL_SERVER_ERROR, "Session error"))?;