remove: marketplace
This commit is contained in:
parent
2407e6b213
commit
b5f841a990
27 changed files with 22 additions and 1067 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::{str::FromStr, time::Duration};
|
||||
use std::time::Duration;
|
||||
use crate::{
|
||||
get_user_from_token,
|
||||
model::{ApiReturn, Error},
|
||||
|
@ -572,28 +572,11 @@ pub async fn delete_user_request(
|
|||
.delete_user(id, &req.password, user.permissions.check_manager())
|
||||
.await
|
||||
{
|
||||
Ok(ua) => {
|
||||
// delete stripe user
|
||||
if let Some(stripe_id) = ua.seller_data.account_id
|
||||
&& let Some(ref client) = data.3
|
||||
{
|
||||
if let Err(e) = stripe::Account::delete(
|
||||
&client,
|
||||
&stripe::AccountId::from_str(&stripe_id).unwrap(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
return Json(Error::MiscError(e.to_string()).into());
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
Json(ApiReturn {
|
||||
ok: true,
|
||||
message: "User deleted".to_string(),
|
||||
payload: (),
|
||||
})
|
||||
}
|
||||
Ok(_) => Json(ApiReturn {
|
||||
ok: true,
|
||||
message: "User deleted".to_string(),
|
||||
payload: (),
|
||||
}),
|
||||
Err(e) => Json(e.into()),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue