@@ -9,7 +9,6 @@ pub struct BackupProfileView {
99 pub schedule_frequency : Option < String > ,
1010 pub monthly_price : Option < f64 > ,
1111 pub max_files : Option < i32 > ,
12- pub created_at : Option < i64 > ,
1312}
1413
1514/// Load backup profiles from the API
@@ -32,7 +31,6 @@ pub async fn load_backups(
3231 schedule_frequency : obj. get ( "scheduleFrequency" ) . and_then ( |v| v. as_str ( ) ) . map ( |s| s. to_string ( ) ) ,
3332 monthly_price : obj. get ( "monthlyPrice" ) . and_then ( |v| v. as_f64 ( ) ) ,
3433 max_files : obj. get ( "maxFiles" ) . and_then ( |v| v. as_i64 ( ) ) . map ( |i| i as i32 ) ,
35- created_at : obj. get ( "createdAt" ) . and_then ( |v| v. as_i64 ( ) ) ,
3634 } ) ;
3735 }
3836 }
@@ -43,17 +41,6 @@ pub async fn load_backups(
4341 backups
4442}
4543
46- /// Get backup profile for instance
47- pub async fn get_backup_profile (
48- client : & reqwest:: Client ,
49- api_base_url : & str ,
50- api_token : & str ,
51- instance_id : & str ,
52- ) -> Value {
53- let endpoint = format ! ( "/v1/backups/{}" , instance_id) ;
54- api_call ( client, api_base_url, api_token, "GET" , & endpoint, None , None ) . await
55- }
56-
5744/// Create backup profile
5845pub async fn create_backup_profile (
5946 client : & reqwest:: Client ,
@@ -76,37 +63,3 @@ pub async fn create_backup_profile(
7663
7764 api_call ( client, api_base_url, api_token, "POST" , "/v1/backups" , Some ( payload) , None ) . await
7865}
79-
80- /// Update backup profile
81- pub async fn update_backup_profile (
82- client : & reqwest:: Client ,
83- api_base_url : & str ,
84- api_token : & str ,
85- instance_id : & str ,
86- schedule_frequency : & str ,
87- period_id : i32 ,
88- schedule_week_days : Option < Vec < String > > ,
89- ) -> Value {
90- let mut payload = serde_json:: json!( {
91- "instanceId" : instance_id,
92- "scheduleFrequency" : schedule_frequency,
93- "periodId" : period_id
94- } ) ;
95-
96- if let Some ( days) = schedule_week_days {
97- payload[ "scheduleWeekDays" ] = Value :: Array ( days. into_iter ( ) . map ( Value :: String ) . collect ( ) ) ;
98- }
99-
100- api_call ( client, api_base_url, api_token, "PUT" , "/v1/backups" , Some ( payload) , None ) . await
101- }
102-
103- /// Delete backup profile
104- pub async fn delete_backup_profile (
105- client : & reqwest:: Client ,
106- api_base_url : & str ,
107- api_token : & str ,
108- instance_id : & str ,
109- ) -> Value {
110- let endpoint = format ! ( "/v1/backups/{}" , instance_id) ;
111- api_call ( client, api_base_url, api_token, "DELETE" , & endpoint, None , None ) . await
112- }
0 commit comments