@@ -138,7 +138,7 @@ impl KubeController {
138138 )
139139 . collect ( ) ;
140140
141- let total_pages = ( total_count + pagination . page_size - 1 ) / pagination. page_size ;
141+ let total_pages = total_count. div_ceil ( pagination. page_size ) ;
142142
143143 Ok ( PaginatedResult {
144144 data : kube_environments,
@@ -579,7 +579,7 @@ impl KubeController {
579579 pub async fn delete_kube_environment (
580580 & self ,
581581 org_id : Uuid ,
582- user_id : Uuid ,
582+ _user_id : Uuid ,
583583 environment_id : Uuid ,
584584 ) -> Result < ( ) , ApiError > {
585585 // Authorize deletion (HRPC already enforced ownership/role, so we just ensure the environment exists and belongs to the org)
@@ -732,8 +732,8 @@ impl KubeController {
732732
733733 pub async fn pause_kube_environment (
734734 & self ,
735- org_id : Uuid ,
736- user_id : Uuid ,
735+ _org_id : Uuid ,
736+ _user_id : Uuid ,
737737 environment_id : Uuid ,
738738 ) -> Result < ( ) , ApiError > {
739739 let environment = self
@@ -2327,12 +2327,10 @@ impl KubeController {
23272327 // Only insert/update workloads that were actually deployed
23282328 for workload in workloads_to_deploy {
23292329 let details = & workload. details ;
2330- let containers_json = serde_json:: to_value ( & details. containers )
2331- . map ( Json :: from)
2332- . unwrap_or_else ( |_| Json :: from ( serde_json:: json!( [ ] ) ) ) ;
2333- let ports_json = serde_json:: to_value ( & details. ports )
2334- . map ( Json :: from)
2335- . unwrap_or_else ( |_| Json :: from ( serde_json:: json!( [ ] ) ) ) ;
2330+ let containers_json =
2331+ serde_json:: to_value ( & details. containers ) . unwrap_or_else ( |_| serde_json:: json!( [ ] ) ) ;
2332+ let ports_json =
2333+ serde_json:: to_value ( & details. ports ) . unwrap_or_else ( |_| serde_json:: json!( [ ] ) ) ;
23362334 let workload_yaml = details. workload_yaml . clone ( ) ;
23372335
23382336 let existing_workload = lapdev_db_entities:: kube_environment_workload:: Entity :: find ( )
0 commit comments