Skip to content

Commit

Permalink
chore: test subscribers v0
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Oct 24, 2023
1 parent fd6241e commit d390045
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 8 deletions.
127 changes: 126 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ rmp-serde = "1.1.1"
deadpool-redis = "0.12.0"
rand_chacha = "0.3.1"
sqlx = { version = "0.7.1", features = ["runtime-tokio-native-tls", "postgres", "chrono", "uuid"] }
wiremock = "0.5.19"

[dev-dependencies]
sha3 = "0.10.8"
Expand Down
3 changes: 1 addition & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ pub struct Configuration {

impl Configuration {
pub fn new() -> crate::Result<Configuration> {
let config = envy::from_env::<Configuration>()?;
Ok(config)
Ok(envy::from_env::<Configuration>()?)
}

pub fn log_level(&self) -> tracing::Level {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub async fn bootstrap(mut shutdown: broadcast::Receiver<()>, config: Configurat
.route("/v1/:project_id/notify", post(handlers::notify_v1::handler))
.route(
"/:project_id/subscribers",
get(handlers::get_subscribers_v1::handler),
get(handlers::get_subscribers_v0::handler),
)
.route(
"/v1/:project_id/subscribers",
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
#[tokio::main]
async fn main() -> Result<()> {
let (_signal, shutdown) = broadcast::channel(1);
dotenv().ok();
dotenv().expect("Failed to load .env file");

let config = Configuration::new().expect("Failed to load config!");
tracing_subscriber::fmt()
Expand Down
Loading

0 comments on commit d390045

Please sign in to comment.