diff --git a/Dockerfile b/Dockerfile index 957ddca..54ed206 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bmrlab/muse-credits:v0.6 as github-credits +FROM ghcr.io/bmrlab/muse-credits:v0.7 as github-credits ENV start_params=" " diff --git a/config/development.yaml b/config/development.yaml index 94d376a..ef6c014 100644 --- a/config/development.yaml +++ b/config/development.yaml @@ -83,7 +83,7 @@ database: # Redis Configuration redis: # Redis connection URI - uri: {{ get_env(name="REDIS_URL", default="redis://:SSVFDKBJNDFNJ%40rfgvf3244@r-2zeid7zt2t0zc87xhx.redis.rds.aliyuncs.com:6379") }} + uri: {{ get_env(name="REDIS_URL", default="redis://127.0.0.1") }} # Dangerously flush all data in Redis on startup. dangerous operation, make sure that you using this flag only on dev environments or test mode dangerously_flush: false diff --git a/migration/src/lib.rs b/migration/src/lib.rs index 6e847f7..36f1d52 100644 --- a/migration/src/lib.rs +++ b/migration/src/lib.rs @@ -3,18 +3,18 @@ pub use sea_orm_migration::prelude::*; pub struct Migrator; -mod m20240221_062832_wallets; +mod m20240221_062832_wallet; mod m20240221_064740_index_wallet_addr; -mod m20240222_033407_bills; +mod m20240222_033407_bill; mod m20240222_033749_transaction_events; #[async_trait::async_trait] impl MigratorTrait for Migrator { fn migrations() -> Vec> { vec![ - Box::new(m20240221_062832_wallets::Migration), + Box::new(m20240221_062832_wallet::Migration), Box::new(m20240221_064740_index_wallet_addr::Migration), - Box::new(m20240222_033407_bills::Migration), + Box::new(m20240222_033407_bill::Migration), Box::new(m20240222_033749_transaction_events::Migration), ] } diff --git a/migration/src/m20240221_062832_wallets.rs b/migration/src/m20240221_062832_wallet.rs similarity index 100% rename from migration/src/m20240221_062832_wallets.rs rename to migration/src/m20240221_062832_wallet.rs diff --git a/migration/src/m20240222_033407_bills.rs b/migration/src/m20240222_033407_bill.rs similarity index 100% rename from migration/src/m20240222_033407_bills.rs rename to migration/src/m20240222_033407_bill.rs diff --git a/src/controllers/transaction.rs b/src/controllers/transaction.rs index aa38031..35d15b0 100644 --- a/src/controllers/transaction.rs +++ b/src/controllers/transaction.rs @@ -180,7 +180,7 @@ async fn transation_process( let from_res = &txn .execute(Statement::from_sql_and_values( sea_orm::DatabaseBackend::MySql, - "update wallets set balance = ?, updated_at=? where addr = ? and balance = ?", + "update wallet set balance = ?, updated_at=? where addr = ? and balance = ?", [ from_balance.into(), now.into(), @@ -192,7 +192,7 @@ async fn transation_process( let to_res = &txn .execute(Statement::from_sql_and_values( sea_orm::DatabaseBackend::MySql, - "update wallets set balance = ?, updated_at=? where addr = ? and balance = ?", + "update wallet set balance = ?, updated_at=? where addr = ? and balance = ?", [ to_balance.into(), now.into(),