Skip to content

Commit

Permalink
Fix resource paths
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Sep 30, 2023
1 parent 15d5664 commit 83ab6fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
APPLE_PASS_TYPE_IDENTIFIER=
APPLE_TEAM_IDENTIFIER=
CERTIFICATE_PATH="keys/cert.p12"
CERTIFICATE_PASSWORD=
CERTIFICATE_PATH="./keys/cert.p12"
CERTIFICATE_PASSWORD=
TEMPLATE_PATH="./Event.pass"
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axum::{routing::get, Router};
use std::net::SocketAddr;
use std::str::FromStr;

mod passes;

mod models;
Expand Down
2 changes: 1 addition & 1 deletion src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub async fn passes_handler(Query(data): Query<PassModel>) -> Result<impl IntoRe
}
};

let mut pass = Pass::from_path(Path::new("./Event.pass")).unwrap();
let mut pass = Pass::from_path(Path::new(env::var("TEMPLATE_PATH").unwrap().as_str())).unwrap();

// Set general attributes
pass.pass_type_identifier(env::var("APPLE_PASS_TYPE_IDENTIFIER").unwrap().as_str());
Expand Down

0 comments on commit 83ab6fa

Please sign in to comment.