Skip to content

Commit

Permalink
chore: comment, reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed May 14, 2024
1 parent c6a64d8 commit e0c138b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/handlers/update_fcm_v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ pub async fn handler(
headers: HeaderMap,
mut form_body: Multipart,
) -> Result<Json<UpdateTenantFcmV1Response>, Error> {
// -- check if tenant is real
let _existing_tenant = state.tenant_store.get_tenant(&id).await?;

// JWT token verification
#[cfg(feature = "cloud")]
let jwt_verification_result =
validate_tenant_request(&state.jwt_validation_client, &headers, &id).await;

// -- check if tenant is real
let _existing_tenant = state.tenant_store.get_tenant(&id).await?;

#[cfg(not(feature = "cloud"))]
let jwt_verification_result = validate_tenant_request(&state.jwt_validation_client, &headers);

Expand Down
3 changes: 2 additions & 1 deletion tests/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ impl TestContext for ConfigContext {
log_level_otel: "info,echo-server=trace".into(),
disable_header: true,
validate_signatures: false,
// TODO setting this to avoid hex parsing errors; I don't think it's used
relay_public_key: env::var("RELAY_PUBLIC_KEY").unwrap_or(
// Default relay public key if env not set
// TODO I don't think this is used in the tests, so this should be refactored/removed
"ff469faa970df23c23a6542765ce8dba2a907538522833b2327a153e365d138e".to_string(),
),
database_url: env::var("DATABASE_URL")
Expand Down

0 comments on commit e0c138b

Please sign in to comment.