增加角色复制后台功能 修复swagger不能带token的问题

This commit is contained in:
pixel
2020-04-20 16:21:50 +08:00
parent eea245e405
commit 0be0ec9a2f
11 changed files with 456 additions and 11 deletions

View File

@@ -29,6 +29,25 @@ func CreateAuthority(c *gin.Context) {
}
}
// @Tags authority
// @Summary 拷贝角色
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body response.SysAuthorityCopyResponse true "拷贝角色"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"拷贝成功"}"
// @Router /authority/copyAuthority [post]
func CopyAuthority(c *gin.Context) {
var copyInfo resp.SysAuthorityCopyResponse
_ = c.ShouldBindJSON(&copyInfo)
err, authBack := service.CopyAuthority(copyInfo)
if err != nil {
response.FailWithMessage(fmt.Sprintf("创建失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{Authority: authBack}, c)
}
}
// @Tags authority
// @Summary 删除角色
// @Security ApiKeyAuth