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