mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 03:35:12 +00:00
feat(console): change default organization (#5151)
Adds the possibility to change the default organization from the organization overview
This commit is contained in:
@@ -222,6 +222,8 @@ import {
|
||||
GetCustomPasswordChangeMessageTextRequest,
|
||||
AddNotificationPolicyRequest,
|
||||
AddNotificationPolicyResponse,
|
||||
SetDefaultOrgRequest,
|
||||
SetDefaultOrgResponse,
|
||||
} from '../proto/generated/zitadel/admin_pb';
|
||||
import { SearchQuery } from '../proto/generated/zitadel/member_pb';
|
||||
import { ListQuery } from '../proto/generated/zitadel/object_pb';
|
||||
@@ -233,6 +235,13 @@ import { GrpcService } from './grpc.service';
|
||||
export class AdminService {
|
||||
constructor(private readonly grpcService: GrpcService) {}
|
||||
|
||||
public setDefaultOrg(orgId: string): Promise<SetDefaultOrgResponse.AsObject> {
|
||||
const req = new SetDefaultOrgRequest();
|
||||
req.setOrgId(orgId);
|
||||
|
||||
return this.grpcService.admin.setDefaultOrg(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public listEvents(req: ListEventsRequest): Promise<ListEventsResponse> {
|
||||
return this.grpcService.admin.listEvents(req, null).then((resp) => resp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user