fix(caldav): do not crash with error 400 when fetching the list of all projects
Because the "all projects" handler is the same as the one to fetch a single project, the handler would fail because no project was specified. However, it should return an empty project instead so that it later fetches all projects. Resolves https://community.vikunja.io/t/http-400-when-trying-to-connect-via-caldav/3054
This commit is contained in:
@@ -172,7 +172,7 @@ func EntryHandler(c echo.Context) error {
|
||||
func getProjectFromParam(c echo.Context) (project *models.ProjectWithTasksAndBuckets, err error) {
|
||||
param := c.Param("project")
|
||||
if param == "" {
|
||||
return nil, echo.ErrBadRequest
|
||||
return &models.ProjectWithTasksAndBuckets{}, nil
|
||||
}
|
||||
|
||||
s := db.NewSession()
|
||||
|
||||
Reference in New Issue
Block a user