From f83eb0d0d2e1d2f952b5cae7db1c0ffd4a04cba1 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 21 Oct 2022 19:50:07 +0000 Subject: [PATCH] include user id in login --- web3_proxy/src/frontend/users.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web3_proxy/src/frontend/users.rs b/web3_proxy/src/frontend/users.rs index cba42dd8..fdf054e5 100644 --- a/web3_proxy/src/frontend/users.rs +++ b/web3_proxy/src/frontend/users.rs @@ -148,6 +148,7 @@ pub struct PostLoginResponse { bearer_token: Ulid, /// Used for authenticating with the RPC endpoints. api_keys: Vec, + user_id: u64, // TODO: what else? } @@ -287,6 +288,7 @@ pub async fn user_login_post( let response_json = PostLoginResponse { bearer_token, api_keys: uks.iter().map(|uk| uk.api_key.into()).collect(), + user_id: u.id, }; let response = (StatusCode::CREATED, Json(response_json)).into_response(); @@ -304,6 +306,7 @@ pub async fn user_login_post( let response_json = PostLoginResponse { bearer_token, api_keys: uks.iter().map(|uk| uk.api_key.into()).collect(), + user_id: u.id, }; let response = (StatusCode::OK, Json(response_json)).into_response();