feat(external-registry): Introduce external registry management

This commit is contained in:
2024-12-30 00:01:26 +01:00
parent 89e44b2e5f
commit caf3a095f2
11 changed files with 110 additions and 37 deletions

View File

@ -44,7 +44,7 @@ export class ClusterManager {
);
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.cluster.IReq_Any_Cloudly_GetClusters>(
new plugins.typedrequest.TypedHandler('getAllClusters', async (dataArg) => {
new plugins.typedrequest.TypedHandler('getClusters', async (dataArg) => {
// TODO: do authentication here
const clusters = await this.getAllClusters();
return {
@ -57,11 +57,11 @@ export class ClusterManager {
// delete cluster
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.cluster.IReq_Any_Cloudly_DeleteClusterById>(
new plugins.typedrequest.TypedHandler('deleteCluster', async (reqDataArg, toolsArg) => {
new plugins.typedrequest.TypedHandler('deleteClusterById', async (reqDataArg, toolsArg) => {
await toolsArg.passGuards([this.cloudlyRef.authManager.adminIdentityGuard], reqDataArg);
await this.deleteCluster(reqDataArg.clusterId);
return {
success: true,
ok: true,
};
}),
);