优化
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"kra/internal/server/httpx"
|
||||
"kra/internal/service"
|
||||
"kra/internal/service/dto"
|
||||
@@ -44,8 +42,7 @@ func (h *Permission) SetButtons(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (h *Permission) CanRemoveButton(c *gin.Context) {
|
||||
id, _ := strconv.ParseUint(c.Query("id"), 10, 64)
|
||||
allowed, err := h.service.CanRemoveButton(c.Request.Context(), uint(id))
|
||||
allowed, err := h.service.CanRemoveButton(c.Request.Context(), c.Query("id"))
|
||||
if err != nil {
|
||||
httpx.Fail(c, err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user