1234567891011121314151617181920212223242526 |
- package system
- import (
- "kpt-tmr-group/http/middleware"
- "kpt-tmr-group/pkg/apierr"
- "kpt-tmr-group/pkg/apiok"
- operationPb "kpt-tmr-group/proto/go/backend/operation"
- "net/http"
- "github.com/gin-gonic/gin"
- )
- func AddMenu(c *gin.Context) {
- req := make([]*operationPb.AddRoleRequest, 0)
- if err := c.BindJSON(&req); err != nil {
- apierr.AbortBadRequest(c, http.StatusBadRequest, err)
- return
- }
- if err := middleware.BackendOperation(c).OpsService.CreateSystemRoleList(c, req); err != nil {
- apierr.ClassifiedAbort(c, err)
- return
- }
- c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
- }
|