Update to latest actix-web.

This commit is contained in:
LukeMathWalker 2021-05-01 16:11:16 +01:00
parent d05c9c9491
commit 80ba8ace26
3 changed files with 365 additions and 339 deletions

695
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,10 @@ path = "src/main.rs"
name = "zero2prod"
[dependencies]
actix-web = "4.0.0-beta.3"
actix-http = "=3.0.0-beta.5"
actix-service = "=2.0.0-beta.5"
actix-web = "=4.0.0-beta.5"
serde = "1.0.115"
config = { version = "0.10.1", default-features = false, features = ["yaml"] }
sqlx = { version = "0.5.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
@ -25,12 +28,12 @@ tracing-futures = "0.2.4"
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
tracing-bunyan-formatter = "0.1.6"
tracing-log = "0.1.1"
tracing-actix-web = "0.3.0-beta.2"
serde-aux = "1.0.1"
unicode-segmentation = "1.7.1"
validator = "0.12.0"
rand = { version = "0.8", features=["std_rng"] }
sha2 = { version = "0.9" }
tracing-actix-web = "0.4.0-beta.4"
[dev-dependencies]
once_cell = "1.7.2"

View file

@ -74,7 +74,7 @@ fn run(
let email_client = Data::new(email_client);
let server = HttpServer::new(move || {
App::new()
.wrap(TracingLogger)
.wrap(TracingLogger::default())
.route("/health_check", web::get().to(health_check))
.route("/subscriptions", web::post().to(subscribe))
.route("/subscriptions/confirm", web::get().to(confirm))