From 47c2da7f1856e95956cdb968fa95295d3441a9f6 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 13 Nov 2022 17:07:01 +0100 Subject: [PATCH] feat: rename lists to projects --- pkg/routes/routes.go | 2 +- pkg/user/users_project.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index 3213c2920..d883bcb06 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -325,7 +325,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 3186635ac..97fe25c8c 100644 --- a/pkg/user/users_project.go +++ b/pkg/user/users_project.go @@ -32,7 +32,7 @@ type ProjectUserOpts struct { MatchFuzzily 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 ProjectUsers(s *xorm.Session, search string, opts *ProjectUserOpts) (users []*User, err error) { if opts == nil { opts = &ProjectUserOpts{}