this repo has no description
0
fork

Configure Feed

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

lexicon changes and new xrpc query for day six

+34 -14
+24
shared/lexicons/codes/advent/challenge/getCode.json
··· 1 + { 2 + "defs": { 3 + "main": { 4 + "description": "A protected XRPC endpoint to get an at://advent challenge code for the user", 5 + "output": { 6 + "encoding": "application/json", 7 + "schema": { 8 + "properties": { 9 + "code": { 10 + "type": "string" 11 + } 12 + }, 13 + "required": [ 14 + "code" 15 + ], 16 + "type": "object" 17 + } 18 + }, 19 + "type": "query" 20 + } 21 + }, 22 + "id": "codes.advent.challenge.getCode", 23 + "lexicon": 1 24 + }
shared/lexicons/codes/advent/day.json shared/lexicons/codes/advent/challenge/day.json
shared/lexicons/codes/advent/shhh.json shared/lexicons/codes/advent/challenge/shhh.json
+1 -1
shared/src/advent/challenges/day_six.rs
··· 12 12 use sqlx::PgPool; 13 13 14 14 pub const LXM_PART_ONE: &str = "codes.advent.challenge.exampleEndpoint"; 15 - pub const LXM_PART_TWO: &str = "codes.advent.challenge.getChallengeCode"; 15 + pub const LXM_PART_TWO: &str = "codes.advent.challenge.getCode"; 16 16 17 17 pub struct DaySix { 18 18 pub pool: PgPool,
+9 -13
web/src/handlers/custom/day_six.rs
··· 100 100 "Invalid DID in JWT iss claim", 101 101 ) 102 102 })?; 103 - let did_doc = state 104 - .handle_resolver 105 - .resolve(&iss_did) 106 - .await 107 - .map_err(|e| { 108 - log::error!("Failed to resolve DID for {}: {}", claims.iss, e); 109 - xrpc_error( 110 - StatusCode::INTERNAL_SERVER_ERROR, 111 - "InternalError", 112 - "Failed to resolve DID document", 113 - ) 114 - })?; 103 + let did_doc = state.handle_resolver.resolve(&iss_did).await.map_err(|e| { 104 + log::error!("Failed to resolve DID for {}: {}", claims.iss, e); 105 + xrpc_error( 106 + StatusCode::INTERNAL_SERVER_ERROR, 107 + "InternalError", 108 + "Failed to resolve DID document", 109 + ) 110 + })?; 115 111 116 112 let (key_alg, key_bytes) = extract_signing_key_bytes(&did_doc).map_err(|e| { 117 113 xrpc_error( ··· 134 130 "SELECT * FROM challenges WHERE user_did = $1 AND day = $2", 135 131 ) 136 132 .bind(&claims.iss) 137 - .bind(6i16) 133 + .bind(6_i16) 138 134 .fetch_optional(&state.postgres_pool) 139 135 .await 140 136 .map_err(|e| {