feat: rename app provider to application provider across codebase and update terminology
This commit is contained in:
@@ -41,7 +41,7 @@ pub struct UserPersistentData {
|
||||
pub slas: Vec<ServiceLevelAgreement>,
|
||||
// App provider data
|
||||
pub apps: Vec<crate::models::user::PublishedApp>,
|
||||
pub app_deployments: Vec<AppDeployment>,
|
||||
pub application_deployments: Vec<AppDeployment>,
|
||||
// Account deletion tracking
|
||||
pub deleted: Option<bool>,
|
||||
pub deleted_at: Option<String>,
|
||||
@@ -137,7 +137,7 @@ impl Default for UserPersistentData {
|
||||
availability: None,
|
||||
slas: Vec::new(),
|
||||
apps: Vec::new(),
|
||||
app_deployments: Vec::new(),
|
||||
application_deployments: Vec::new(),
|
||||
deleted: None,
|
||||
deleted_at: None,
|
||||
deletion_reason: None,
|
||||
@@ -1247,22 +1247,22 @@ impl UserPersistence {
|
||||
}
|
||||
|
||||
/// Get app deployments for a user
|
||||
pub fn get_user_app_deployments(user_email: &str) -> Vec<AppDeployment> {
|
||||
pub fn get_user_application_deployments(user_email: &str) -> Vec<AppDeployment> {
|
||||
if let Some(data) = Self::load_user_data(user_email) {
|
||||
data.app_deployments
|
||||
data.application_deployments
|
||||
} else {
|
||||
Vec::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// Add a new app deployment
|
||||
pub fn add_user_app_deployment(
|
||||
pub fn add_user_application_deployment(
|
||||
user_email: &str,
|
||||
deployment: AppDeployment
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut data = crate::models::builders::SessionDataBuilder::load_or_create(user_email);
|
||||
|
||||
data.app_deployments.push(deployment.clone());
|
||||
data.application_deployments.push(deployment.clone());
|
||||
Self::save_user_data(&data)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user