use actix_web::{HttpResponse, Responder, web}; use askama::Template; use crate::controllers::settings_controller::BaseSettingsPage; use crate::data::client::{Client, ClientManager}; use crate::data::current_user::CurrentUser; #[derive(Template)] #[template(path = "settings/clients_list.html")] struct ClientsListTemplate { _parent: BaseSettingsPage, clients: Vec, } pub async fn clients_route(user: CurrentUser, clients: web::Data) -> impl Responder { HttpResponse::Ok().body(ClientsListTemplate { _parent: BaseSettingsPage::get( "Clients list", &user, None, None, ), clients: clients.cloned(), }.render().unwrap()) }