fix(cloudproxy): keep the proxy endpoint project and server consistent

This commit is contained in:
rainzm
2021-05-06 16:52:51 +08:00
parent 02d922b5a8
commit de7ef8baaf
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -110,8 +110,8 @@ func (man *SProxyEndpointManager) PerformCreateFromServer(ctx context.Context, u
IntranetIpAddr: nic.IpAddr,
}
proxyendpoint.Name = name
proxyendpoint.DomainId = userCred.GetProjectDomainId()
proxyendpoint.ProjectId = userCred.GetProjectId()
proxyendpoint.DomainId = serverInfo.Server.DomainId
proxyendpoint.ProjectId = serverInfo.Server.ProjectId
if err := man.TableSpec().Insert(ctx, proxyendpoint); err != nil {
return nil, httperrors.NewServerError("database insertion error: %v", err)
}