mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 14:47:33 +00:00
fix: actions v2beta with api design for GA (#10303)
# Which Problems Are Solved Actions v2beta API does not adhere to the [API design](https://github.com/zitadel/zitadel/blob/main/API_DESIGN.md) fully. # How the Problems Are Solved - Correct body usage for ListExecutions - Correct REST path for ListTargets and ListExecutions - Correct attribute names for ListTargetsResponse and ListExecutionsResponse # Additional Changes - Remove unused object import. # Additional Context Closes #10138 --------- Co-authored-by: Marco A. <marco@zitadel.com>
This commit is contained in:
@@ -45,7 +45,7 @@ export class ActionsTwoActionsComponent {
|
||||
switchMap(() => {
|
||||
return this.actionService.listExecutions({ sortingColumn: ExecutionFieldName.ID, pagination: { asc: true } });
|
||||
}),
|
||||
map(({ result }) => result.map(correctlyTypeExecution)),
|
||||
map(({ executions }) => executions.map(correctlyTypeExecution)),
|
||||
catchError((err) => {
|
||||
this.toast.showError(err);
|
||||
return of([]);
|
||||
@@ -59,7 +59,7 @@ export class ActionsTwoActionsComponent {
|
||||
switchMap(() => {
|
||||
return this.actionService.listTargets({});
|
||||
}),
|
||||
map(({ result }) => result),
|
||||
map(({ targets }) => targets),
|
||||
catchError((err) => {
|
||||
this.toast.showError(err);
|
||||
return of([]);
|
||||
|
@@ -115,13 +115,13 @@ export class ActionsTwoAddActionTargetComponent {
|
||||
|
||||
this.actionService
|
||||
.listTargets({})
|
||||
.then(({ result }) => {
|
||||
const targets = result.reduce((acc, target) => {
|
||||
.then(({ targets }) => {
|
||||
const result = targets.reduce((acc, target) => {
|
||||
acc.set(target.id, target);
|
||||
return acc;
|
||||
}, new Map<string, Target>());
|
||||
|
||||
targetsSignal.set({ state: 'loaded', targets });
|
||||
targetsSignal.set({ state: 'loaded', targets: result });
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
|
@@ -39,7 +39,7 @@ export class ActionsTwoTargetsComponent {
|
||||
switchMap(() => {
|
||||
return this.actionService.listTargets({});
|
||||
}),
|
||||
map(({ result }) => result),
|
||||
map(({ targets }) => targets),
|
||||
catchError((err) => {
|
||||
this.toast.showError(err);
|
||||
return of([]);
|
||||
|
Reference in New Issue
Block a user