use crate::bootstrap::state::AppState;
use shared::Response as RpResponse;
use tracing::info;
pub async fn routes(state: AppState) -> RpResponse {
RpResponse::IngressRoutes(state.ingress.snapshot())
}
pub async fn reconcile(state: AppState, service_id: Option<String>) -> RpResponse {
info!(service_id = ?service_id, "ingress: reconcile sob demanda");
crate::features::deploy::recovery::reconcile(
&state.db,
&state.docker,
&state.ingress,
&state.tls,
)
.await;
RpResponse::IngressRoutes(state.ingress.snapshot())
}