Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
  • Loading branch information
82marbag authored and Daniele Ahmed committed Nov 14, 2022
1 parent f19a20f commit b89e78d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ name = "pokemon-service-lambda"
path = "src/bin/pokemon-service-lambda.rs"

[[bin]]
name = "pokemon-service-conninfo"
path = "src/bin/pokemon-service-conninfo.rs"
name = "pokemon-service-connect-info"
path = "src/bin/pokemon-service-connect-info.rs"

[dependencies]
async-stream = "0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ struct Args {
port: u16,
}

/// Retrieves the users storage. No authentication required for locals.
/// Retrieves the user's storage. No authentication required for locals.
pub async fn get_storage_with_local_approved(
input: pokemon_service_server_sdk::input::GetStorageInput,
conn_info: aws_smithy_http_server::Extension<aws_smithy_http_server::routing::ConnectInfo<std::net::SocketAddr>>,
connect_info: aws_smithy_http_server::Extension<aws_smithy_http_server::routing::ConnectInfo<std::net::SocketAddr>>,
) -> Result<pokemon_service_server_sdk::output::GetStorageOutput, pokemon_service_server_sdk::error::GetStorageError> {
tracing::debug!("attempting to authenticate storage user");
let local = conn_info.0 .0.ip() == "127.0.0.1".parse::<std::net::IpAddr>().unwrap();
let local = connect_info.0 .0.ip() == "127.0.0.1".parse::<std::net::IpAddr>().unwrap();

// We currently support Ash: he has nothing stored
if input.user == "ash" && input.passcode == "pikachu123" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub async fn get_pokemon_species(
}
}

/// Retrieves the users storage.
/// Retrieves the user's storage.
pub async fn get_storage(
input: input::GetStorageInput,
_state: Extension<Arc<State>>,
Expand Down

0 comments on commit b89e78d

Please sign in to comment.