d4x1 commented on code in PR #5727:
URL: 
https://github.com/apache/incubator-devlake/pull/5727#discussion_r1271677492


##########
backend/server/services/project.go:
##########
@@ -350,9 +351,9 @@ func refreshProjectMetrics(tx dal.Transaction, projectInput 
*models.ApiInputProj
        return nil
 }
 
-func makeProjectOutput(baseProject *models.BaseProject, withLatestPipeLine 
bool) (*models.ApiOutputProject, errors.Error) {
+func makeProjectOutput(project *models.Project, withLastPipeline bool) 
(*models.ApiOutputProject, errors.Error) {
        projectOutput := &models.ApiOutputProject{}
-       projectOutput.BaseProject = *baseProject
+       projectOutput.Project = *project

Review Comment:
   There are two reasons:
   1. `Project` is the core field of `ApiOutputProject`, and it shouldn't be 
nil.
   2. Keep the original form 
[BaseProject](https://github.com/apache/incubator-devlake/blob/main/backend/core/models/project.go#L65).



##########
backend/server/services/project.go:
##########
@@ -350,9 +351,9 @@ func refreshProjectMetrics(tx dal.Transaction, projectInput 
*models.ApiInputProj
        return nil
 }
 
-func makeProjectOutput(baseProject *models.BaseProject, withLatestPipeLine 
bool) (*models.ApiOutputProject, errors.Error) {
+func makeProjectOutput(project *models.Project, withLastPipeline bool) 
(*models.ApiOutputProject, errors.Error) {
        projectOutput := &models.ApiOutputProject{}
-       projectOutput.BaseProject = *baseProject
+       projectOutput.Project = *project

Review Comment:
   @klesh 
   There are two reasons:
   1. `Project` is the core field of `ApiOutputProject`, and it shouldn't be 
nil.
   2. Keep the original form 
[BaseProject](https://github.com/apache/incubator-devlake/blob/main/backend/core/models/project.go#L65).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to