diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index ed8c2c3c7..9ef395d6c 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -326,7 +326,7 @@ func registerAPIRoutes(a *echo.Group) { a.GET("/projects/:project", projectHandler.ReadOneWeb) a.POST("/projects/:project", projectHandler.UpdateWeb) a.DELETE("/projects/:project", projectHandler.DeleteWeb) - a.PUT("/namespaces/:namespace/projects", projectHandler.CreateWeb) + a.PUT("/projects", projectHandler.CreateWeb) a.GET("/projects/:project/projectusers", apiv1.ListUsersForProject) if config.ServiceEnableLinkSharing.GetBool() { diff --git a/pkg/user/users_project.go b/pkg/user/users_project.go index eea76d612..5a7657cb1 100644 --- a/pkg/user/users_project.go +++ b/pkg/user/users_project.go @@ -31,7 +31,7 @@ type ProjectUserOpts struct { ReturnAllIfNoSearchProvided bool } -// ProjectUsers returns a project with all users, filtered by an optional search string +// ListUsers returns a list with all users, filtered by an optional search string func ListUsers(s *xorm.Session, search string, opts *ProjectUserOpts) (users []*User, err error) { if opts == nil { opts = &ProjectUserOpts{}