feat(deployment): Implement Deployment and DeploymentManager classes with CRUD operations and service integration
This commit is contained in:
@@ -142,13 +142,21 @@ export const getAllDataAction = dataState.createAction(async (statePartArg) => {
|
||||
'/typedrequest',
|
||||
'getServices'
|
||||
);
|
||||
const responseServices = await trGetServices.fire({
|
||||
identity: loginStatePart.getState().identity,
|
||||
});
|
||||
currentState = {
|
||||
...currentState,
|
||||
services: responseServices.services,
|
||||
};
|
||||
try {
|
||||
const responseServices = await trGetServices.fire({
|
||||
identity: loginStatePart.getState().identity,
|
||||
});
|
||||
currentState = {
|
||||
...currentState,
|
||||
services: responseServices?.services || [],
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch services:', error);
|
||||
currentState = {
|
||||
...currentState,
|
||||
services: [],
|
||||
};
|
||||
}
|
||||
|
||||
// Deployments
|
||||
const trGetDeployments =
|
||||
@@ -156,13 +164,21 @@ export const getAllDataAction = dataState.createAction(async (statePartArg) => {
|
||||
'/typedrequest',
|
||||
'getDeployments'
|
||||
);
|
||||
const responseDeployments = await trGetDeployments.fire({
|
||||
identity: loginStatePart.getState().identity,
|
||||
});
|
||||
currentState = {
|
||||
...currentState,
|
||||
deployments: responseDeployments.deployments,
|
||||
};
|
||||
try {
|
||||
const responseDeployments = await trGetDeployments.fire({
|
||||
identity: loginStatePart.getState().identity,
|
||||
});
|
||||
currentState = {
|
||||
...currentState,
|
||||
deployments: responseDeployments?.deployments || [],
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch deployments:', error);
|
||||
currentState = {
|
||||
...currentState,
|
||||
deployments: [],
|
||||
};
|
||||
}
|
||||
|
||||
return currentState;
|
||||
});
|
||||
|
Reference in New Issue
Block a user