From 199b3e97fc764e7cc72c4b1f8c523c137e51903f Mon Sep 17 00:00:00 2001 From: msyfls123 Date: Mon, 19 Feb 2024 16:46:51 +0800 Subject: [PATCH] chore: update rocket related dependencies --- server/Cargo.toml | 11 ++++++----- server/src/view/utils.rs | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/server/Cargo.toml b/server/Cargo.toml index 58f92d2..123ff1a 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -15,17 +15,18 @@ indradb-lib = { version = "3.0.3", features = ["rocksdb-datastore"] } serde_json = "1.0.75" handlebars = "4.2.2" serde = "1.0.135" -juniper_rocket = "0.8.2" -juniper = "0.15.8" +juniper_rocket = { git = "https://github.com/graphql-rust/juniper.git", rev = "ac6e609" } +juniper = { git = "https://github.com/graphql-rust/juniper.git", rev = "ac6e609" } [dependencies.rocket] -version = "0.5.0-rc.2" +version = "0.5" features = ["json", "uuid"] [dependencies.rocket_dyn_templates] -version = "0.1.0-rc.2" +version = "0.1.0-rc.4" features = ["handlebars"] [dependencies.rocket_auth] -version = "0.4.0" +git = "https://github.com/msyfls123/rocket_auth.git" +branch = "fix/outcome" features = ["rusqlite"] diff --git a/server/src/view/utils.rs b/server/src/view/utils.rs index e7ece1f..9bc2252 100644 --- a/server/src/view/utils.rs +++ b/server/src/view/utils.rs @@ -16,10 +16,10 @@ impl<'a> FromRequest<'a> for SPAInfo { Outcome::Success(user) => Outcome::Success(SPAInfo { user: Some(user), }), - Outcome::Failure(_) => Outcome::Success(SPAInfo { + Outcome::Error(_) => Outcome::Success(SPAInfo { user: None, }), - Outcome::Forward(_) => Outcome::Failure((Status::from_code(401).unwrap(), ())), + Outcome::Forward(_) => Outcome::Error((Status::from_code(401).unwrap(), ())), } }