From f04d1fea56d223fc719970ebdd43eca865f7fea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Fri, 26 Jan 2024 17:27:33 +0000 Subject: [PATCH] updated rocket in nym-api --- nym-api/Cargo.toml | 8 ++++---- nym-api/src/circulating_supply_api/routes.rs | 3 --- nym-api/src/coconut/api_routes/mod.rs | 3 --- nym-api/src/network/routes.rs | 3 --- nym-api/src/node_status_api/local_guard.rs | 2 +- nym-api/src/node_status_api/routes.rs | 3 --- nym-api/src/nym_contract_cache/routes.rs | 3 --- nym-api/src/nym_nodes/routes.rs | 3 --- 8 files changed, 5 insertions(+), 23 deletions(-) diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 3b19c6215b..51a0242b91 100644 --- a/nym-api/Cargo.toml +++ b/nym-api/Cargo.toml @@ -32,8 +32,8 @@ pin-project = "1.0" rand = "0.8.5" rand-07 = { package = "rand", version = "0.7.3" } # required for compatibility reqwest = { workspace = true, features = ["json"] } -rocket = { version = "0.5.0-rc.2", features = ["json"] } -rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", rev = "dfd3662c49e2f6fc37df35091cb94d82f7fb5915" } +rocket = { version = "0.5.0", features = ["json"] } +rocket_cors = { version = "0.6.0" } serde = { workspace = true } serde_json = { workspace = true } tap = "1.0" @@ -60,8 +60,8 @@ sqlx = { workspace = true, features = [ "migrate", ] } -okapi = { version = "0.7.0-rc.1", features = ["impl_json_schema"] } -rocket_okapi = { version = "0.8.0-rc.2", features = ["swagger"] } +okapi = { version = "0.7.0", features = ["impl_json_schema"] } +rocket_okapi = { version = "0.8.0", features = ["swagger"] } schemars = { workspace = true, features = ["preserve_order"] } zeroize = { workspace = true } diff --git a/nym-api/src/circulating_supply_api/routes.rs b/nym-api/src/circulating_supply_api/routes.rs index fcf23b67fb..5bc76ab8bb 100644 --- a/nym-api/src/circulating_supply_api/routes.rs +++ b/nym-api/src/circulating_supply_api/routes.rs @@ -1,9 +1,6 @@ // Copyright 2022-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use crate::circulating_supply_api::cache::CirculatingSupplyCache; use crate::node_status_api::models::ErrorResponse; use nym_api_requests::models::CirculatingSupplyResponse; diff --git a/nym-api/src/coconut/api_routes/mod.rs b/nym-api/src/coconut/api_routes/mod.rs index 6e505d0479..cb86923b89 100644 --- a/nym-api/src/coconut/api_routes/mod.rs +++ b/nym-api/src/coconut/api_routes/mod.rs @@ -1,9 +1,6 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use crate::coconut::api_routes::helpers::build_credentials_response; use crate::coconut::error::{CoconutError, Result}; use crate::coconut::helpers::{accepted_vote_err, blind_sign}; diff --git a/nym-api/src/network/routes.rs b/nym-api/src/network/routes.rs index 5febb8fd75..73625f8b88 100644 --- a/nym-api/src/network/routes.rs +++ b/nym-api/src/network/routes.rs @@ -1,9 +1,6 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use crate::network::models::{ContractInformation, NetworkDetails}; use crate::nym_contract_cache::cache::NymContractCache; use nym_contracts_common::ContractBuildInformation; diff --git a/nym-api/src/node_status_api/local_guard.rs b/nym-api/src/node_status_api/local_guard.rs index fbbe8e27ec..9be3a252c2 100644 --- a/nym-api/src/node_status_api/local_guard.rs +++ b/nym-api/src/node_status_api/local_guard.rs @@ -36,7 +36,7 @@ impl<'r> FromRequest<'r> for LocalRequest { "Received a request from {:?} for a local-only route", request.client_ip() ); - Outcome::Failure((Status::Unauthorized, NonLocalRequestError)) + Outcome::Error((Status::Unauthorized, NonLocalRequestError)) } } } diff --git a/nym-api/src/node_status_api/routes.rs b/nym-api/src/node_status_api/routes.rs index c3b95e3336..466b10f883 100644 --- a/nym-api/src/node_status_api/routes.rs +++ b/nym-api/src/node_status_api/routes.rs @@ -1,9 +1,6 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use super::helpers::_get_gateways_detailed; use super::NodeStatusCache; use crate::node_status_api::helpers::{ diff --git a/nym-api/src/nym_contract_cache/routes.rs b/nym-api/src/nym_contract_cache/routes.rs index 5573d3a629..01fbab47ac 100644 --- a/nym-api/src/nym_contract_cache/routes.rs +++ b/nym-api/src/nym_contract_cache/routes.rs @@ -1,9 +1,6 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use crate::{ node_status_api::{ helpers::{_get_active_set_detailed, _get_mixnodes_detailed, _get_rewarded_set_detailed}, diff --git a/nym-api/src/nym_nodes/routes.rs b/nym-api/src/nym_nodes/routes.rs index 3dbf62120b..1df0250844 100644 --- a/nym-api/src/nym_nodes/routes.rs +++ b/nym-api/src/nym_nodes/routes.rs @@ -1,9 +1,6 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only -// due to the macro expansion of rather old rocket macros... -#![allow(unused_imports)] - use crate::node_describe_cache::DescribedNodes; use crate::nym_contract_cache::cache::NymContractCache; use crate::support::caching::cache::SharedCache;