feat: push config updates to coreflow

This commit is contained in:
2026-04-28 16:02:05 +00:00
parent ee6d4c3d04
commit 1bed907f53
5 changed files with 113 additions and 14 deletions
+2 -3
View File
@@ -139,6 +139,7 @@ export class ClusterManager {
const clusterUser = new this.cloudlyRef.authManager.CUser({
id: await this.cloudlyRef.authManager.CUser.getNewId(),
data: {
username: `cluster-${configObjectArg.id}`,
role: 'cluster',
type: 'machine',
tokens: [
@@ -151,9 +152,7 @@ export class ClusterManager {
},
});
await clusterUser.save();
Object.assign(configObjectArg, {
userId: clusterUser.id,
});
configObjectArg.data.userId = clusterUser.id;
const clusterInstance = await Cluster.fromConfigObject(configObjectArg);
await clusterInstance.save();
return clusterInstance;