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 {
let mut user = User::default();
user.authorized_clients = Some(
clients
.get_default_clients()
.iter()
.map(|u| u.id.clone())
.collect(),
);
let user = User {
authorized_clients: Some(
clients
.get_default_clients()
.iter()
.map(|u| u.id.clone())
.collect(),
),
..Default::default()
};
HttpResponse::Ok().body(
EditUserTemplate {