diff --git a/pkg/app/server/grpcapi/api.go b/pkg/app/server/grpcapi/api.go index 94234d0854..50c668a109 100644 --- a/pkg/app/server/grpcapi/api.go +++ b/pkg/app/server/grpcapi/api.go @@ -138,14 +138,15 @@ func (a *API) AddApplication(ctx context.Context, req *apiservice.AddApplication } app := model.Application{ - Id: uuid.New().String(), - Name: req.Name, - PipedId: req.PipedId, - ProjectId: key.ProjectId, - GitPath: gitpath, - Kind: req.Kind, - CloudProvider: req.CloudProvider, - Description: req.Description, + Id: uuid.New().String(), + Name: req.Name, + PipedId: req.PipedId, + ProjectId: key.ProjectId, + GitPath: gitpath, + Kind: req.Kind, + CloudProvider: req.CloudProvider, + PlatformProvider: req.CloudProvider, + Description: req.Description, } if err := a.applicationStore.Add(ctx, &app); err != nil { return nil, gRPCEntityOperationError(err, fmt.Sprintf("add application %s", app.Id)) diff --git a/pkg/app/server/grpcapi/web_api.go b/pkg/app/server/grpcapi/web_api.go index ec65252891..4bb9008b69 100644 --- a/pkg/app/server/grpcapi/web_api.go +++ b/pkg/app/server/grpcapi/web_api.go @@ -496,15 +496,16 @@ func (a *WebAPI) AddApplication(ctx context.Context, req *webservice.AddApplicat } app := model.Application{ - Id: uuid.New().String(), - Name: req.Name, - PipedId: req.PipedId, - ProjectId: claims.Role.ProjectId, - GitPath: gitpath, - Kind: req.Kind, - CloudProvider: req.CloudProvider, - Description: req.Description, - Labels: req.Labels, + Id: uuid.New().String(), + Name: req.Name, + PipedId: req.PipedId, + ProjectId: claims.Role.ProjectId, + GitPath: gitpath, + Kind: req.Kind, + CloudProvider: req.CloudProvider, + PlatformProvider: req.CloudProvider, + Description: req.Description, + Labels: req.Labels, } if err = a.applicationStore.Add(ctx, &app); err != nil { return nil, gRPCEntityOperationError(err, fmt.Sprintf("add application %s", app.Id))