Add default clients #105
@ -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(
|
||||
let user = User {
|
||||
authorized_clients: Some(
|
||||
clients
|
||||
.get_default_clients()
|
||||
.iter()
|
||||
.map(|u| u.id.clone())
|
||||
.collect(),
|
||||
);
|
||||
),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
HttpResponse::Ok().body(
|
||||
EditUserTemplate {
|
||||
|
Loading…
Reference in New Issue
Block a user