chore: Cleanup kubectlApplyAllChannelHandler

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-06-01 09:17:42 -04:00
1 parent 0696f466a8
commit a86361e09e
1 file changed
+2 -4
@@ -7,6 +7,7 @@ import { kubectlApplyAllChannel } from "../../common/kube-helpers/channels";
import getClusterByIdInjectable from "../../features/cluster/storage/common/get-by-id.injectable";
import resourceApplierInjectable from "../resource-applier/create-resource-applier.injectable";
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
import { result } from "@k8slens/utilities";
const kubectlApplyAllChannelHandlerInjectable = getRequestChannelListenerInjectable({
id: "kubectl-apply-all-channel-handler-listener",
@@ -26,10 +27,7 @@ const kubectlApplyAllChannelHandlerInjectable = getRequestChannelListenerInjecta
emitAppEvent({ name: "cluster", action: "kubectl-apply-all" });
if (!cluster) {
return {
isOk: false,
error: `No cluster found for clusterId="${clusterId}"`,
};
return result.error(`No cluster found for clusterId="${clusterId}"`);
}
const resourceApplier = di.inject(resourceApplierInjectable, cluster);