The smokesignal.events web application

bug: language case caused missing template

+29 -8
+18 -3
src/http/handle_admin_tap.rs
··· 134 134 path: &str, 135 135 ) -> Option<T> { 136 136 let url = format!("{}{}", base_url, path); 137 - match client.get(&url).timeout(Duration::from_secs(30)).send().await { 137 + match client 138 + .get(&url) 139 + .timeout(Duration::from_secs(30)) 140 + .send() 141 + .await 142 + { 138 143 Ok(response) if response.status().is_success() => response.json::<T>().await.ok(), 139 144 Ok(response) => { 140 145 tracing::debug!(url = %url, status = %response.status(), "TAP stats request failed"); ··· 177 182 let subject = form.subject.trim(); 178 183 179 184 // Resolve the subject (handle or DID) to a DID 180 - let document = match admin_ctx.web_context.identity_resolver.resolve(subject).await { 185 + let document = match admin_ctx 186 + .web_context 187 + .identity_resolver 188 + .resolve(subject) 189 + .await 190 + { 181 191 Ok(doc) => doc, 182 192 Err(err) => { 183 193 return contextual_error!( ··· 302 312 let subject = form.subject.trim(); 303 313 304 314 // Resolve the subject (handle or DID) to a DID 305 - let document = match admin_ctx.web_context.identity_resolver.resolve(subject).await { 315 + let document = match admin_ctx 316 + .web_context 317 + .identity_resolver 318 + .resolve(subject) 319 + .await 320 + { 306 321 Ok(doc) => doc, 307 322 Err(err) => { 308 323 return contextual_error!(
+11 -5
src/http/handle_share_rsvp_bluesky.rs
··· 21 21 }, 22 22 storage::event::{event_get, extract_event_details, rsvp_get_by_event_and_did}, 23 23 }; 24 - use atproto_client::com::atproto::repo::{CreateRecordRequest, CreateRecordResponse, create_record}; 24 + use atproto_client::com::atproto::repo::{ 25 + CreateRecordRequest, CreateRecordResponse, create_record, 26 + }; 25 27 26 28 #[derive(Deserialize)] 27 29 pub(crate) struct ShareRsvpBlueskyRequest { ··· 38 40 let current_handle = auth.require("/rsvp")?; 39 41 let session = auth.session().ok_or(CommonError::NotAuthorized)?; 40 42 41 - let render_template = format!("{}/share_rsvp_bluesky.partial.html", language); 43 + let render_template = format!( 44 + "{}/share_rsvp_bluesky.partial.html", 45 + language.to_string().to_lowercase() 46 + ); 42 47 43 48 // Fetch event details 44 49 let event = event_get(&web_context.pool, &request.event_aturi) ··· 48 53 })?; 49 54 50 55 // Verify the user has a "going" RSVP to this event 51 - let rsvp = rsvp_get_by_event_and_did(&web_context.pool, &request.event_aturi, &current_handle.did) 52 - .await? 53 - .ok_or(ShareBlueskyError::NoGoingRsvp)?; 56 + let rsvp = 57 + rsvp_get_by_event_and_did(&web_context.pool, &request.event_aturi, &current_handle.did) 58 + .await? 59 + .ok_or(ShareBlueskyError::NoGoingRsvp)?; 54 60 55 61 if rsvp.status != "going" { 56 62 return Err(ShareBlueskyError::NoGoingRsvp.into());