get devops count by username
Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"kubesphere.io/kubesphere/pkg/apis/network/v1alpha1/numorstring"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/network/v1alpha1/numorstring"
|
||||
)
|
||||
|
||||
// A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy
|
||||
|
||||
@@ -134,6 +134,14 @@ func addWebService(c *restful.Container) error {
|
||||
Returns(http.StatusOK, ok, models.PageableResponse{}).
|
||||
Doc("List the devops projects for the workspace member").
|
||||
Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag}))
|
||||
ws.Route(ws.GET("/devopscount").
|
||||
To(tenant.GetDevOpsProjectsCount).
|
||||
Param(ws.PathParameter("member", "workspace member's username")).
|
||||
Returns(http.StatusOK, ok, struct {
|
||||
Count uint32 `json:"count"`
|
||||
}{}).
|
||||
Doc("Get the devops projects count for the member").
|
||||
Metadata(restfulspec.KeyOpenAPITags, []string{constants.TenantResourcesTag}))
|
||||
ws.Route(ws.POST("/workspaces/{workspace}/devops").
|
||||
To(tenant.CreateDevopsProject).
|
||||
Param(ws.PathParameter("workspace", "workspace name")).
|
||||
|
||||
Reference in New Issue
Block a user