mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-12 11:30:07 +08:00
fix: 修改登录接口文档 (#2334)
This commit is contained in:
parent
ac98d63fcd
commit
879d640793
@ -19,10 +19,10 @@ type BaseApi struct{}
|
|||||||
// @Summary User login
|
// @Summary User login
|
||||||
// @Description 用户登录
|
// @Description 用户登录
|
||||||
// @Accept json
|
// @Accept json
|
||||||
|
// @Param EntranceCode header string true "安全入口 base64 加密串"
|
||||||
// @Param request body dto.Login true "request"
|
// @Param request body dto.Login true "request"
|
||||||
// @Success 200 {object} dto.UserLoginInfo
|
// @Success 200 {object} dto.UserLoginInfo
|
||||||
// @Router /auth/login [post]
|
// @Router /auth/login [post]
|
||||||
// @Header 200 {string} EntranceCode "安全入口"
|
|
||||||
func (b *BaseApi) Login(c *gin.Context) {
|
func (b *BaseApi) Login(c *gin.Context) {
|
||||||
var req dto.Login
|
var req dto.Login
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
@ -943,6 +943,13 @@ const docTemplate = `{
|
|||||||
],
|
],
|
||||||
"summary": "User login",
|
"summary": "User login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "安全入口 base64 加密串",
|
||||||
|
"name": "EntranceCode",
|
||||||
|
"in": "header",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "request",
|
"description": "request",
|
||||||
"name": "request",
|
"name": "request",
|
||||||
@ -958,12 +965,6 @@ const docTemplate = `{
|
|||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.UserLoginInfo"
|
"$ref": "#/definitions/dto.UserLoginInfo"
|
||||||
},
|
|
||||||
"headers": {
|
|
||||||
"EntranceCode": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "安全入口"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -936,6 +936,13 @@
|
|||||||
],
|
],
|
||||||
"summary": "User login",
|
"summary": "User login",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "安全入口 base64 加密串",
|
||||||
|
"name": "EntranceCode",
|
||||||
|
"in": "header",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "request",
|
"description": "request",
|
||||||
"name": "request",
|
"name": "request",
|
||||||
@ -951,12 +958,6 @@
|
|||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.UserLoginInfo"
|
"$ref": "#/definitions/dto.UserLoginInfo"
|
||||||
},
|
|
||||||
"headers": {
|
|
||||||
"EntranceCode": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "安全入口"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4638,6 +4638,11 @@ paths:
|
|||||||
- application/json
|
- application/json
|
||||||
description: 用户登录
|
description: 用户登录
|
||||||
parameters:
|
parameters:
|
||||||
|
- description: 安全入口 base64 加密串
|
||||||
|
in: header
|
||||||
|
name: EntranceCode
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
- description: request
|
- description: request
|
||||||
in: body
|
in: body
|
||||||
name: request
|
name: request
|
||||||
@ -4647,10 +4652,6 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
headers:
|
|
||||||
EntranceCode:
|
|
||||||
description: 安全入口
|
|
||||||
type: string
|
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.UserLoginInfo'
|
$ref: '#/definitions/dto.UserLoginInfo'
|
||||||
summary: User login
|
summary: User login
|
||||||
|
Loading…
x
Reference in New Issue
Block a user