lower log levels
This commit is contained in:
parent
57f640765a
commit
651244fbca
|
@ -12,8 +12,7 @@ use axum::{
|
||||||
use axum_client_ip::InsecureClientIp;
|
use axum_client_ip::InsecureClientIp;
|
||||||
use axum_macros::debug_handler;
|
use axum_macros::debug_handler;
|
||||||
use chrono::{TimeZone, Utc};
|
use chrono::{TimeZone, Utc};
|
||||||
use entities;
|
use entities::{self, balance, login, pending_login, referee, referrer, rpc_key, user};
|
||||||
use entities::{balance, login, pending_login, referee, referrer, rpc_key, user};
|
|
||||||
use ethers::{prelude::Address, types::Bytes};
|
use ethers::{prelude::Address, types::Bytes};
|
||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use http::StatusCode;
|
use http::StatusCode;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use serde_json::json;
|
||||||
use std::num::NonZeroU64;
|
use std::num::NonZeroU64;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use stripe::Webhook;
|
use stripe::Webhook;
|
||||||
use tracing::{debug, error, info, trace};
|
use tracing::{debug, error, trace};
|
||||||
|
|
||||||
/// `GET /user/balance/stripe` -- Use a bearer token to get the user's balance and spend.
|
/// `GET /user/balance/stripe` -- Use a bearer token to get the user's balance and spend.
|
||||||
///
|
///
|
||||||
|
@ -96,8 +96,7 @@ pub async fn user_balance_stripe_post(
|
||||||
_ => return Ok("Received irrelevant webhook".into_response()),
|
_ => return Ok("Received irrelevant webhook".into_response()),
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: lower log level when done testing
|
debug!(?intent);
|
||||||
info!(?intent);
|
|
||||||
|
|
||||||
if intent.status.as_str() != "succeeded" {
|
if intent.status.as_str() != "succeeded" {
|
||||||
return Ok("Received Webhook".into_response());
|
return Ok("Received Webhook".into_response());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::TestApp;
|
use crate::TestApp;
|
||||||
use tracing::info;
|
use tracing::trace;
|
||||||
use web3_proxy::frontend::users::authentication::LoginPostResponse;
|
use web3_proxy::frontend::users::authentication::LoginPostResponse;
|
||||||
|
|
||||||
/// Helper function to increase the balance of a user, from an admin
|
/// Helper function to increase the balance of a user, from an admin
|
||||||
|
@ -10,7 +10,7 @@ pub async fn get_admin_deposits(
|
||||||
user: &LoginPostResponse,
|
user: &LoginPostResponse,
|
||||||
) -> serde_json::Value {
|
) -> serde_json::Value {
|
||||||
let increase_balance_post_url = format!("{}user/deposits/admin", x.proxy_provider.url());
|
let increase_balance_post_url = format!("{}user/deposits/admin", x.proxy_provider.url());
|
||||||
info!("Get admin increase deposits");
|
trace!("Get admin increase deposits");
|
||||||
// Login the user
|
// Login the user
|
||||||
// Use the bearer token of admin to increase user balance
|
// Use the bearer token of admin to increase user balance
|
||||||
let admin_balance_deposits = r
|
let admin_balance_deposits = r
|
||||||
|
@ -19,12 +19,12 @@ pub async fn get_admin_deposits(
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
info!(?admin_balance_deposits, "http response");
|
trace!(?admin_balance_deposits, "http response");
|
||||||
let admin_balance_deposits = admin_balance_deposits
|
let admin_balance_deposits = admin_balance_deposits
|
||||||
.json::<serde_json::Value>()
|
.json::<serde_json::Value>()
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
info!(?admin_balance_deposits, "json response");
|
trace!(?admin_balance_deposits, "json response");
|
||||||
|
|
||||||
admin_balance_deposits
|
admin_balance_deposits
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue