mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix type errors due to changing result error type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f21e42d7e7
commit
d8d6403b32
@ -5,11 +5,24 @@
|
||||
import { getActiveHelmRepositoriesChannel } from "../../../../common/helm/get-active-helm-repositories-channel";
|
||||
import { getRequestChannelListenerInjectable } from "@k8slens/messaging";
|
||||
import getActiveHelmRepositoriesInjectable from "./get-active-helm-repositories.injectable";
|
||||
import { result } from "@k8slens/utilities";
|
||||
|
||||
const getActiveHelmRepositoriesChannelListenerInjectable = getRequestChannelListenerInjectable({
|
||||
id: "get-active-helm-repositories-channel-listener",
|
||||
channel: getActiveHelmRepositoriesChannel,
|
||||
getHandler: (di) => di.inject(getActiveHelmRepositoriesInjectable),
|
||||
getHandler: (di) => {
|
||||
const getActiveHelmRepositories = di.inject(getActiveHelmRepositoriesInjectable);
|
||||
|
||||
return async () => {
|
||||
const helmResult = await getActiveHelmRepositories();
|
||||
|
||||
if (helmResult.isOk) {
|
||||
return helmResult;
|
||||
}
|
||||
|
||||
return result.error(helmResult.error.toString());
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export default getActiveHelmRepositoriesChannelListenerInjectable;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user