diff --git a/src/restapi/user.rs b/src/restapi/user.rs index a46c39eb..24f293ed 100644 --- a/src/restapi/user.rs +++ b/src/restapi/user.rs @@ -18,11 +18,16 @@ pub async fn get_user(req: HttpRequest, data: web::Data) -> Result().unwrap_or(-1)) + .bind(user_id) + .fetch_one(&data.db) + .await + .map_err(|e| { + log::error!("{:?}", e); + RpcError::bad_request("invalid user ID, l1 address or l2 public key") + })?; let user_info = AccountDesc { id: user.id,