Add default clients #105

Merged
pierre merged 9 commits from feat-default-client into master 2023-04-15 10:19:16 +00:00
Showing only changes of commit bd69c60559 - Show all commits

View File

@ -234,14 +234,16 @@ pub async fn users_route(
} }
pub async fn create_user(admin: CurrentUser, clients: web::Data<ClientManager>) -> impl Responder { pub async fn create_user(admin: CurrentUser, clients: web::Data<ClientManager>) -> impl Responder {
let mut user = User::default(); let user = User {
user.authorized_clients = Some( authorized_clients: Some(
clients clients
.get_default_clients() .get_default_clients()
.iter() .iter()
.map(|u| u.id.clone()) .map(|u| u.id.clone())
.collect(), .collect(),
); ),
..Default::default()
};
HttpResponse::Ok().body( HttpResponse::Ok().body(
EditUserTemplate { EditUserTemplate {