if (this.role === 'admin' || this.role === 'superadmin') {
this.organizationService.getDropdownOrganizations().pipe(
tap(availableOrganizations => {
this.availableOrganizations = availableOrganizations;
}),
switchMap(availableOrganizations => {
return this.projectService.getProjects(availableOrganizations[0]?.id);
}),
).subscribe(availableProjects => {
this.availableProjects = availableProjects;
this.getNotifications();
});
} else {
this.getNotifications();
}
Hello Everyone,
In the code above i pass orgId to project service and subscribe to availableProjects
My question is I want to make another request same as getProjects() to getUsers() and pass orgId and get both projects and users with this.
How can it be done?