add: store coin transfer source
This commit is contained in:
parent
a08552338b
commit
98426d0989
11 changed files with 105 additions and 9 deletions
|
@ -7,7 +7,7 @@ use axum::{
|
|||
};
|
||||
use tetratto_core::model::{
|
||||
auth::{Notification, User},
|
||||
economy::{CoinTransfer, CoinTransferMethod},
|
||||
economy::{CoinTransfer, CoinTransferMethod, CoinTransferSource},
|
||||
moderation::AuditLogEntry,
|
||||
permissions::{FinePermission, SecondaryPermission},
|
||||
ApiReturn, Error,
|
||||
|
@ -635,6 +635,7 @@ pub async fn handle_stupid_fucking_checkout_success_session(
|
|||
user.id,
|
||||
100,
|
||||
CoinTransferMethod::Transfer,
|
||||
CoinTransferSource::Purchase,
|
||||
),
|
||||
true,
|
||||
)
|
||||
|
@ -651,6 +652,7 @@ pub async fn handle_stupid_fucking_checkout_success_session(
|
|||
user.id,
|
||||
400,
|
||||
CoinTransferMethod::Transfer,
|
||||
CoinTransferSource::Purchase,
|
||||
),
|
||||
true,
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{get_user_from_token, State, cookie::CookieJar};
|
||||
use axum::{response::IntoResponse, Extension, Json};
|
||||
use tetratto_core::model::{
|
||||
economy::{CoinTransfer, CoinTransferMethod},
|
||||
economy::{CoinTransfer, CoinTransferMethod, CoinTransferSource},
|
||||
oauth,
|
||||
requests::{ActionData, ActionRequest, ActionType},
|
||||
ApiReturn, Error,
|
||||
|
@ -29,6 +29,7 @@ pub async fn create_request(
|
|||
},
|
||||
req.amount,
|
||||
CoinTransferMethod::Transfer, // this endpoint is ONLY for regular transfers; products export a buy endpoint for the other method
|
||||
CoinTransferSource::General,
|
||||
),
|
||||
true,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue