add oauth loginlog & fix bugs

This commit is contained in:
ljw
2024-09-19 10:44:49 +08:00
parent ebd1feb8d1
commit a4b413dadb
48 changed files with 3477 additions and 184 deletions

View File

@@ -709,6 +709,172 @@ const docTemplateadmin = `{
}
}
},
"/admin/loginLog/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "登录日志删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志删除",
"parameters": [
{
"description": "登录日志信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.LoginLog"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLog"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "用户ID",
"name": "user_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLogList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/logout": {
"post": {
"description": "登出",
@@ -738,6 +904,280 @@ const docTemplateadmin = `{
}
}
},
"/admin/oauth/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建Oauth",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "创建Oauth",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth删除",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth编辑",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/create": {
"post": {
"security": [
@@ -1646,6 +2086,55 @@ const docTemplateadmin = `{
}
}
},
"/admin/user/myOauth": {
"get": {
"security": [
{
"token": []
}
],
"description": "我的授权",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "我的授权",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/admin.UserOauthItem"
}
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/update": {
"post": {
"security": [
@@ -1760,6 +2249,9 @@ const docTemplateadmin = `{
"password": {
"type": "string"
},
"platform": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -1877,6 +2369,35 @@ const docTemplateadmin = `{
}
}
},
"admin.OauthForm": {
"type": "object",
"required": [
"client_id",
"client_secret",
"op",
"redirect_url"
],
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
}
}
},
"admin.PeerForm": {
"type": "object",
"properties": {
@@ -1971,6 +2492,17 @@ const docTemplateadmin = `{
}
}
},
"admin.UserOauthItem": {
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"third_type": {
"type": "string"
}
}
},
"admin.UserPasswordForm": {
"type": "object",
"required": [
@@ -2110,6 +2642,110 @@ const docTemplateadmin = `{
}
}
},
"model.LoginLog": {
"type": "object",
"properties": {
"client": {
"description": "webadmin,webclient,app,",
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"ip": {
"type": "string"
},
"platform": {
"description": "windows,linux,mac,android,ios",
"type": "string"
},
"type": {
"description": "account,oauth",
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"uuid": {
"type": "string"
}
}
},
"model.LoginLogList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.LoginLog"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Oauth": {
"type": "object",
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"model.OauthList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Oauth"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Peer": {
"type": "object",
"properties": {

View File

@@ -702,6 +702,172 @@
}
}
},
"/admin/loginLog/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "登录日志删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志删除",
"parameters": [
{
"description": "登录日志信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.LoginLog"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLog"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/loginLog/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "登录日志列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"登录日志"
],
"summary": "登录日志列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"description": "用户ID",
"name": "user_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.LoginLogList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/logout": {
"post": {
"description": "登出",
@@ -731,6 +897,280 @@
}
}
},
"/admin/oauth/create": {
"post": {
"security": [
{
"token": []
}
],
"description": "创建Oauth",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "创建Oauth",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/delete": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth删除",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/detail/{id}": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth详情",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth详情",
"parameters": [
{
"type": "integer",
"description": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Oauth"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/list": {
"get": {
"security": [
{
"token": []
}
],
"description": "Oauth列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth列表",
"parameters": [
{
"type": "integer",
"description": "页码",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "页大小",
"name": "page_size",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/oauth/update": {
"post": {
"security": [
{
"token": []
}
],
"description": "Oauth编辑",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Oauth"
],
"summary": "Oauth编辑",
"parameters": [
{
"description": "Oauth信息",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.OauthForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.OauthList"
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/create": {
"post": {
"security": [
@@ -1639,6 +2079,55 @@
}
}
},
"/admin/user/myOauth": {
"get": {
"security": [
{
"token": []
}
],
"description": "我的授权",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"用户"
],
"summary": "我的授权",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/admin.UserOauthItem"
}
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/user/update": {
"post": {
"security": [
@@ -1753,6 +2242,9 @@
"password": {
"type": "string"
},
"platform": {
"type": "string"
},
"username": {
"type": "string"
}
@@ -1870,6 +2362,35 @@
}
}
},
"admin.OauthForm": {
"type": "object",
"required": [
"client_id",
"client_secret",
"op",
"redirect_url"
],
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
}
}
},
"admin.PeerForm": {
"type": "object",
"properties": {
@@ -1964,6 +2485,17 @@
}
}
},
"admin.UserOauthItem": {
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"third_type": {
"type": "string"
}
}
},
"admin.UserPasswordForm": {
"type": "object",
"required": [
@@ -2103,6 +2635,110 @@
}
}
},
"model.LoginLog": {
"type": "object",
"properties": {
"client": {
"description": "webadmin,webclient,app,",
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"ip": {
"type": "string"
},
"platform": {
"description": "windows,linux,mac,android,ios",
"type": "string"
},
"type": {
"description": "account,oauth",
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "integer"
},
"uuid": {
"type": "string"
}
}
},
"model.LoginLogList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.LoginLog"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Oauth": {
"type": "object",
"properties": {
"auto_register": {
"type": "boolean"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"op": {
"type": "string"
},
"redirect_url": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"model.OauthList": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Oauth"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"model.Peer": {
"type": "object",
"properties": {

View File

@@ -4,6 +4,8 @@ definitions:
properties:
password:
type: string
platform:
type: string
username:
type: string
required:
@@ -85,6 +87,26 @@ definitions:
username:
type: string
type: object
admin.OauthForm:
properties:
auto_register:
type: boolean
client_id:
type: string
client_secret:
type: string
id:
type: integer
op:
type: string
redirect_url:
type: string
required:
- client_id
- client_secret
- op
- redirect_url
type: object
admin.PeerForm:
properties:
cpu:
@@ -148,6 +170,13 @@ definitions:
- status
- username
type: object
admin.UserOauthItem:
properties:
status:
type: integer
third_type:
type: string
type: object
admin.UserPasswordForm:
properties:
id:
@@ -240,6 +269,75 @@ definitions:
total:
type: integer
type: object
model.LoginLog:
properties:
client:
description: webadmin,webclient,app,
type: string
created_at:
type: string
id:
type: integer
ip:
type: string
platform:
description: windows,linux,mac,android,ios
type: string
type:
description: account,oauth
type: string
updated_at:
type: string
user_id:
type: integer
uuid:
type: string
type: object
model.LoginLogList:
properties:
list:
items:
$ref: '#/definitions/model.LoginLog'
type: array
page:
type: integer
page_size:
type: integer
total:
type: integer
type: object
model.Oauth:
properties:
auto_register:
type: boolean
client_id:
type: string
client_secret:
type: string
created_at:
type: string
id:
type: integer
op:
type: string
redirect_url:
type: string
updated_at:
type: string
type: object
model.OauthList:
properties:
list:
items:
$ref: '#/definitions/model.Oauth'
type: array
page:
type: integer
page_size:
type: integer
total:
type: integer
type: object
model.Peer:
properties:
cpu:
@@ -782,6 +880,105 @@ paths:
summary: 登录
tags:
- 登录
/admin/loginLog/delete:
post:
consumes:
- application/json
description: 登录日志删除
parameters:
- description: 登录日志信息
in: body
name: body
required: true
schema:
$ref: '#/definitions/model.LoginLog'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 登录日志删除
tags:
- 登录日志
/admin/loginLog/detail/{id}:
get:
consumes:
- application/json
description: 登录日志详情
parameters:
- description: ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.LoginLog'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 登录日志详情
tags:
- 登录日志
/admin/loginLog/list:
get:
consumes:
- application/json
description: 登录日志列表
parameters:
- description: 页码
in: query
name: page
type: integer
- description: 页大小
in: query
name: page_size
type: integer
- description: 用户ID
in: query
name: user_id
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.LoginLogList'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 登录日志列表
tags:
- 登录日志
/admin/logout:
post:
consumes:
@@ -801,6 +998,167 @@ paths:
summary: 登出
tags:
- 登录
/admin/oauth/create:
post:
consumes:
- application/json
description: 创建Oauth
parameters:
- description: Oauth信息
in: body
name: body
required: true
schema:
$ref: '#/definitions/admin.OauthForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.Oauth'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 创建Oauth
tags:
- Oauth
/admin/oauth/delete:
post:
consumes:
- application/json
description: Oauth删除
parameters:
- description: Oauth信息
in: body
name: body
required: true
schema:
$ref: '#/definitions/admin.OauthForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: Oauth删除
tags:
- Oauth
/admin/oauth/detail/{id}:
get:
consumes:
- application/json
description: Oauth详情
parameters:
- description: ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.Oauth'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: Oauth详情
tags:
- Oauth
/admin/oauth/list:
get:
consumes:
- application/json
description: Oauth列表
parameters:
- description: 页码
in: query
name: page
type: integer
- description: 页大小
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.OauthList'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: Oauth列表
tags:
- Oauth
/admin/oauth/update:
post:
consumes:
- application/json
description: Oauth编辑
parameters:
- description: Oauth信息
in: body
name: body
required: true
schema:
$ref: '#/definitions/admin.OauthForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/model.OauthList'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: Oauth编辑
tags:
- Oauth
/admin/peer/create:
post:
consumes:
@@ -1338,6 +1696,34 @@ paths:
summary: 管理员列表
tags:
- 用户
/admin/user/myOauth:
get:
consumes:
- application/json
description: 我的授权
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
items:
$ref: '#/definitions/admin.UserOauthItem'
type: array
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 我的授权
tags:
- 用户
/admin/user/update:
post:
consumes: