We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 200e723 commit 11b4dc5Copy full SHA for 11b4dc5
aiplan.go/internal/aiplan/http-project.go
@@ -70,7 +70,6 @@ func (s *Services) ProjectMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
70
// Joins faster than Preload(clause.Associations)
71
var project dao.Project
72
projectQuery := s.db.
73
- Joins("Workspace").
74
Joins("ProjectLead").
75
Where("projects.workspace_id = ?", workspace.ID).
76
Set("userId", user.ID).
@@ -95,6 +94,8 @@ func (s *Services) ProjectMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
95
94
return EErrorDefined(c, apierrors.ErrProjectNotFound)
96
}
97
+ project.Workspace = &workspace
98
+
99
return next(ProjectContext{c.(WorkspaceContext), project, *project.CurrentUserMembership})
100
101
0 commit comments