mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
doc: swagger add auth tag
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/loginloglist [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetLoginLogList(c *gin.Context) {
|
||||
var data models.LoginLog
|
||||
var err error
|
||||
@@ -59,7 +59,7 @@ func GetLoginLogList(c *gin.Context) {
|
||||
// @Param infoId path int true "infoId"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/loginlog/{infoId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetLoginLog(c *gin.Context) {
|
||||
var LoginLog models.LoginLog
|
||||
LoginLog.InfoId, _ = tools.StringToInt(c.Param("infoId"))
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/operloglist [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetOperLogList(c *gin.Context) {
|
||||
var data models.SysOperLog
|
||||
var err error
|
||||
@@ -60,7 +60,7 @@ func GetOperLogList(c *gin.Context) {
|
||||
// @Param infoId path int true "infoId"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/operlog/{infoId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetOperLog(c *gin.Context) {
|
||||
var OperLog models.SysOperLog
|
||||
OperLog.OperId, _ = tools.StringToInt(c.Param("operId"))
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/configList [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetConfigList(c *gin.Context) {
|
||||
var data models.SysConfig
|
||||
var err error
|
||||
@@ -60,7 +60,7 @@ func GetConfigList(c *gin.Context) {
|
||||
// @Param configId path int true "配置编码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/config/{configId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetConfig(c *gin.Context) {
|
||||
var Config models.SysConfig
|
||||
Config.ConfigId, _ = tools.StringToInt(c.Param("configId"))
|
||||
@@ -79,7 +79,7 @@ func GetConfig(c *gin.Context) {
|
||||
// @Param configKey path int true "configKey"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/configKey/{configKey} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetConfigByConfigKey(c *gin.Context) {
|
||||
var Config models.SysConfig
|
||||
Config.ConfigKey = c.Param("configKey")
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ import (
|
||||
// @Param position query string false "position"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/deptList [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDeptList(c *gin.Context) {
|
||||
var Dept models.SysDept
|
||||
Dept.DeptName = c.Request.FormValue("deptName")
|
||||
@@ -46,7 +46,7 @@ func GetDeptTree(c *gin.Context) {
|
||||
// @Param position query string false "position"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dept/{deptId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDept(c *gin.Context) {
|
||||
var Dept models.SysDept
|
||||
Dept.DeptId, _ = tools.StringToInt(c.Param("deptId"))
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dict/data/list [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDictDataList(c *gin.Context) {
|
||||
var data models.DictData
|
||||
var err error
|
||||
@@ -61,7 +61,7 @@ func GetDictDataList(c *gin.Context) {
|
||||
// @Param dictCode path int true "字典编码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dict/data/{dictCode} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDictData(c *gin.Context) {
|
||||
var DictData models.DictData
|
||||
DictData.DictLabel = c.Request.FormValue("dictLabel")
|
||||
@@ -79,7 +79,7 @@ func GetDictData(c *gin.Context) {
|
||||
// @Param dictType path int true "dictType"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dict/databyType/{dictType} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDictDataByDictType(c *gin.Context) {
|
||||
var DictData models.DictData
|
||||
DictData.DictType = c.Param("dictType")
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dict/type/list [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDictTypeList(c *gin.Context) {
|
||||
var data models.DictType
|
||||
var err error
|
||||
@@ -59,7 +59,7 @@ func GetDictTypeList(c *gin.Context) {
|
||||
// @Param dictId path int true "字典类型编码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/dict/type/{dictId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetDictType(c *gin.Context) {
|
||||
var DictType models.DictType
|
||||
DictType.DictName = c.Request.FormValue("dictName")
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import (
|
||||
// @Param status query string false "status"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/post [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetPostList(c *gin.Context) {
|
||||
var data models.Post
|
||||
var err error
|
||||
@@ -48,7 +48,7 @@ func GetPostList(c *gin.Context) {
|
||||
// @Param postId path int true "postId"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/post/{postId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetPost(c *gin.Context) {
|
||||
var Post models.Post
|
||||
Post.PostId, _ = tools.StringToInt(c.Param("postId"))
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import (
|
||||
// @Param pageIndex query int false "页码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/rolelist [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetRoleList(c *gin.Context) {
|
||||
var data models.SysRole
|
||||
var err error
|
||||
|
||||
@@ -57,7 +57,7 @@ func GetSysUserList(c *gin.Context) {
|
||||
// @Param userId path int true "用户编码"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/sysUser/{userId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetSysUser(c *gin.Context) {
|
||||
var SysUser models.SysUser
|
||||
SysUser.UserId, _ = tools.StringToInt(c.Param("userId"))
|
||||
@@ -88,7 +88,7 @@ func GetSysUser(c *gin.Context) {
|
||||
// @Tags 个人中心
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/user/profile [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetSysUserProfile(c *gin.Context) {
|
||||
var SysUser models.SysUser
|
||||
userId := tools.GetUserIdStr(c)
|
||||
@@ -128,7 +128,7 @@ func GetSysUserProfile(c *gin.Context) {
|
||||
// @Tags 用户
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/sysUser [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetSysUserInit(c *gin.Context) {
|
||||
var SysRole models.SysRole
|
||||
var Post models.Post
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ func GenMenuAndApi(c *gin.Context) {
|
||||
Mmenu.Permission = tab.PackageName + ":" + tab.ModuleName + ":list"
|
||||
Mmenu.ParentId = 0
|
||||
Mmenu.NoCache = false
|
||||
Mmenu.Component = tab.ModuleName + "/index"
|
||||
Mmenu.Component = "/" + tab.ModuleName + "/index"
|
||||
Mmenu.Sort = 0
|
||||
Mmenu.Visible = "0"
|
||||
Mmenu.IsFrame = "0"
|
||||
|
||||
@@ -54,7 +54,7 @@ func GetSysTableList(c *gin.Context) {
|
||||
// @Param configKey path int true "configKey"
|
||||
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||
// @Router /api/v1/sys/tables/info/{tableId} [get]
|
||||
// @Security
|
||||
// @Security Bearer
|
||||
func GetSysTables(c *gin.Context) {
|
||||
var data tools.SysTables
|
||||
data.TableId, _ = tools2.StringToInt(c.Param("tableId"))
|
||||
|
||||
Reference in New Issue
Block a user