klesh commented on code in PR #5727:
URL:
https://github.com/apache/incubator-devlake/pull/5727#discussion_r1271673957
##########
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:
Maybe `projectOutput.Project` can be a pointer
##########
backend/core/models/project.go:
##########
@@ -62,8 +62,8 @@ type ApiInputProject struct {
}
type ApiOutputProject struct {
- BaseProject `mapstructure:",squash"`
- Metrics *[]BaseMetric `json:"metrics" mapstructure:"metrics"`
- Blueprint *Blueprint `json:"blueprint" mapstructure:"blueprint"`
- LatestPipeLine *Pipeline `json:"latest_pipeline,omitempty"
mapstructure:"latest_pipeline"`
+ Project `mapstructure:",squash"`
+ Metrics *[]BaseMetric `json:"metrics" mapstructure:"metrics"`
Review Comment:
pointer to an array, it doesn't seem right, did it meant to be
`[]*BaseMetric`?
--
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]