修改角色

This commit is contained in:
苏尹岚
2020-09-27 15:43:22 +08:00
parent 5c9b56b5f4
commit 48eac1bd2d
3 changed files with 58 additions and 0 deletions

View File

@@ -86,3 +86,19 @@ func (c *PowerController) GetRole() {
return retVal, "", err
})
}
// @Title 修改角色
// @Description 修改角色
// @Param token header string true "认证token"
// @Param name formData string true "角色名"
// @Param roleID formData int true "角色ID"
// @Param isDelete formData bool true "是否是删除"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /UpdateRole [put]
func (c *PowerController) UpdateRole() {
c.callUpdateRole(func(params *tPowerUpdateRoleParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.UpdateRole(params.Ctx, params.RoleID, params.Name, params.IsDelete)
return retVal, "", err
})
}