Browse Source

删除注册页面 为注册接口修改为需要权限 防止业务漏洞

main
QM303176530 4 years ago
parent
commit
95a016a76e
  1. 2
      server/api/v1/sys_user.go
  2. 320
      server/docs/docs.go
  3. 318
      server/docs/swagger.json
  4. 215
      server/docs/swagger.yaml
  5. 8
      server/gva/init_data/init_data.go
  6. 1
      server/router/sys_base.go
  7. 1
      server/router/sys_user.go

2
server/api/v1/sys_user.go

@ -22,7 +22,7 @@ import (
// @Produce application/json
// @Param data body model.SysUser true "用户注册接口"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
// @Router /base/register [post]
// @Router /user/register [post]
func Register(c *gin.Context) {
var R request.RegisterStruct
_ = c.ShouldBindJSON(&R)

320
server/docs/docs.go

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-08-31 21:50:05.0136259 +0800 CST m=+0.193314401
// 2020-10-18 12:17:37.2292991 +0800 CST m=+0.263609801
package docs
@ -593,36 +593,6 @@ var doc = `{
}
}
},
"/base/register": {
"post": {
"produces": [
"application/json"
],
"tags": [
"Base"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/casbin/UpdateCasbin": {
"post": {
"security": [
@ -883,6 +853,30 @@ var doc = `{
}
}
},
"/email/emailTest": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "发送测试邮件",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@ -2161,6 +2155,30 @@ var doc = `{
}
}
},
"/system/getServerInfo": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "获取服务器信息",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/system/getSystemConfig": {
"post": {
"security": [
@ -2331,6 +2349,36 @@ var doc = `{
}
}
},
"/user/register": {
"post": {
"produces": [
"application/json"
],
"tags": [
"Base"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/setUserAuthority": {
"post": {
"security": [
@ -2369,6 +2417,44 @@ var doc = `{
}
}
},
"/user/setUserInfo": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "删除用户",
"parameters": [
{
"description": "删除用户",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/workflow/createWorkFlow": {
"post": {
"produces": [
@ -2423,6 +2509,32 @@ var doc = `{
}
}
},
"config.Email": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"host": {
"type": "string"
},
"isSSL": {
"type": "boolean"
},
"nickname": {
"type": "string"
},
"port": {
"type": "integer"
},
"secret": {
"type": "string"
},
"to": {
"type": "string"
}
}
},
"config.JWT": {
"type": "object",
"properties": {
@ -2431,38 +2543,44 @@ var doc = `{
}
}
},
"config.LocalUpload": {
"config.Local": {
"type": "object",
"properties": {
"avatarPath": {
"type": "string"
},
"filePath": {
"path": {
"type": "string"
},
"local": {
"type": "boolean"
}
}
},
"config.Log": {
"config.Mysql": {
"type": "object",
"properties": {
"file": {
"config": {
"type": "string"
},
"dbname": {
"type": "string"
},
"logFile": {
"logMode": {
"type": "boolean"
},
"prefix": {
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"password": {
"type": "string"
},
"path": {
"type": "string"
},
"stdout": {
"username": {
"type": "string"
}
}
},
"config.Mysql": {
"config.Postgresql": {
"type": "object",
"properties": {
"config": {
@ -2471,7 +2589,10 @@ var doc = `{
"dbname": {
"type": "string"
},
"logMode": {
"host": {
"type": "string"
},
"logger": {
"type": "boolean"
},
"maxIdleConns": {
@ -2483,9 +2604,12 @@ var doc = `{
"password": {
"type": "string"
},
"path": {
"port": {
"type": "string"
},
"preferSimpleProtocol": {
"type": "boolean"
},
"username": {
"type": "string"
}
@ -2505,6 +2629,15 @@ var doc = `{
},
"secretKey": {
"type": "string"
},
"useCdnDomains": {
"type": "boolean"
},
"useHttps": {
"type": "boolean"
},
"zone": {
"type": "string"
}
}
},
@ -2533,22 +2666,28 @@ var doc = `{
"type": "object",
"$ref": "#/definitions/config.Casbin"
},
"jwt": {
"email": {
"type": "object",
"$ref": "#/definitions/config.JWT"
"$ref": "#/definitions/config.Email"
},
"localUpload": {
"jwt": {
"type": "object",
"$ref": "#/definitions/config.LocalUpload"
"$ref": "#/definitions/config.JWT"
},
"log": {
"local": {
"description": "oss",
"type": "object",
"$ref": "#/definitions/config.Log"
"$ref": "#/definitions/config.Local"
},
"mysql": {
"description": "gorm",
"type": "object",
"$ref": "#/definitions/config.Mysql"
},
"postgresql": {
"type": "object",
"$ref": "#/definitions/config.Postgresql"
},
"qiniu": {
"type": "object",
"$ref": "#/definitions/config.Qiniu"
@ -2561,21 +2700,52 @@ var doc = `{
"type": "object",
"$ref": "#/definitions/config.Sqlite"
},
"sqlserver": {
"type": "object",
"$ref": "#/definitions/config.Sqlserver"
},
"system": {
"type": "object",
"$ref": "#/definitions/config.System"
},
"zap": {
"type": "object",
"$ref": "#/definitions/config.Zap"
}
}
},
"config.Sqlite": {
"type": "object",
"properties": {
"config": {
"logger": {
"type": "boolean"
},
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"path": {
"type": "string"
}
}
},
"config.Sqlserver": {
"type": "object",
"properties": {
"dbname": {
"type": "string"
},
"logMode": {
"logger": {
"type": "boolean"
},
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"password": {
"type": "string"
},
@ -2599,11 +2769,49 @@ var doc = `{
"env": {
"type": "string"
},
"needInitData": {
"type": "boolean"
},
"ossType": {
"type": "string"
},
"useMultipoint": {
"type": "boolean"
}
}
},
"config.Zap": {
"type": "object",
"properties": {
"director": {
"type": "string"
},
"encodeLevel": {
"type": "string"
},
"format": {
"type": "string"
},
"level": {
"type": "string"
},
"linkName": {
"type": "string"
},
"logInConsole": {
"type": "boolean"
},
"prefix": {
"type": "string"
},
"showLine": {
"type": "boolean"
},
"stacktraceKey": {
"type": "string"
}
}
},
"model.AutoCodeStruct": {
"type": "object",
"properties": {
@ -2971,7 +3179,7 @@ var doc = `{
"description": "是否是完结流节点",
"type": "boolean"
},
"isStrat": {
"isStart": {
"description": "是否是开始流节点",
"type": "boolean"
},

318
server/docs/swagger.json

@ -576,36 +576,6 @@
}
}
},
"/base/register": {
"post": {
"produces": [
"application/json"
],
"tags": [
"Base"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/casbin/UpdateCasbin": {
"post": {
"security": [
@ -866,6 +836,30 @@
}
}
},
"/email/emailTest": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "发送测试邮件",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/fileUploadAndDownload/breakpointContinue": {
"post": {
"security": [
@ -2144,6 +2138,30 @@
}
}
},
"/system/getServerInfo": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"system"
],
"summary": "获取服务器信息",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/system/getSystemConfig": {
"post": {
"security": [
@ -2314,6 +2332,36 @@
}
}
},
"/user/register": {
"post": {
"produces": [
"application/json"
],
"tags": [
"Base"
],
"summary": "用户注册账号",
"parameters": [
{
"description": "用户注册接口",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/user/setUserAuthority": {
"post": {
"security": [
@ -2352,6 +2400,44 @@
}
}
},
"/user/setUserInfo": {
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"SysUser"
],
"summary": "删除用户",
"parameters": [
{
"description": "删除用户",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/model.SysUser"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/workflow/createWorkFlow": {
"post": {
"produces": [
@ -2406,6 +2492,32 @@
}
}
},
"config.Email": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"host": {
"type": "string"
},
"isSSL": {
"type": "boolean"
},
"nickname": {
"type": "string"
},
"port": {
"type": "integer"
},
"secret": {
"type": "string"
},
"to": {
"type": "string"
}
}
},
"config.JWT": {
"type": "object",
"properties": {
@ -2414,38 +2526,44 @@
}
}
},
"config.LocalUpload": {
"config.Local": {
"type": "object",
"properties": {
"avatarPath": {
"type": "string"
},
"filePath": {
"path": {
"type": "string"
},
"local": {
"type": "boolean"
}
}
},
"config.Log": {
"config.Mysql": {
"type": "object",
"properties": {
"file": {
"config": {
"type": "string"
},
"dbname": {
"type": "string"
},
"logFile": {
"logMode": {
"type": "boolean"
},
"prefix": {
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"password": {
"type": "string"
},
"path": {
"type": "string"
},
"stdout": {
"username": {
"type": "string"
}
}
},
"config.Mysql": {
"config.Postgresql": {
"type": "object",
"properties": {
"config": {
@ -2454,7 +2572,10 @@
"dbname": {
"type": "string"
},
"logMode": {
"host": {
"type": "string"
},
"logger": {
"type": "boolean"
},
"maxIdleConns": {
@ -2466,9 +2587,12 @@
"password": {
"type": "string"
},
"path": {
"port": {
"type": "string"
},
"preferSimpleProtocol": {
"type": "boolean"
},
"username": {
"type": "string"
}
@ -2488,6 +2612,15 @@
},
"secretKey": {
"type": "string"
},
"useCdnDomains": {
"type": "boolean"
},
"useHttps": {
"type": "boolean"
},
"zone": {
"type": "string"
}
}
},
@ -2516,22 +2649,28 @@
"type": "object",
"$ref": "#/definitions/config.Casbin"
},
"jwt": {
"email": {
"type": "object",
"$ref": "#/definitions/config.JWT"
"$ref": "#/definitions/config.Email"
},
"localUpload": {
"jwt": {
"type": "object",
"$ref": "#/definitions/config.LocalUpload"
"$ref": "#/definitions/config.JWT"
},
"log": {
"local": {
"description": "oss",
"type": "object",
"$ref": "#/definitions/config.Log"
"$ref": "#/definitions/config.Local"
},
"mysql": {
"description": "gorm",
"type": "object",
"$ref": "#/definitions/config.Mysql"
},
"postgresql": {
"type": "object",
"$ref": "#/definitions/config.Postgresql"
},
"qiniu": {
"type": "object",
"$ref": "#/definitions/config.Qiniu"
@ -2544,21 +2683,52 @@
"type": "object",
"$ref": "#/definitions/config.Sqlite"
},
"sqlserver": {
"type": "object",
"$ref": "#/definitions/config.Sqlserver"
},
"system": {
"type": "object",
"$ref": "#/definitions/config.System"
},
"zap": {
"type": "object",
"$ref": "#/definitions/config.Zap"
}
}
},
"config.Sqlite": {
"type": "object",
"properties": {
"config": {
"logger": {
"type": "boolean"
},
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"path": {
"type": "string"
}
}
},
"config.Sqlserver": {
"type": "object",
"properties": {
"dbname": {
"type": "string"
},
"logMode": {
"logger": {
"type": "boolean"
},
"maxIdleConns": {
"type": "integer"
},
"maxOpenConns": {
"type": "integer"
},
"password": {
"type": "string"
},
@ -2582,11 +2752,49 @@
"env": {
"type": "string"
},
"needInitData": {
"type": "boolean"
},
"ossType": {
"type": "string"
},
"useMultipoint": {
"type": "boolean"
}
}
},
"config.Zap": {
"type": "object",
"properties": {
"director": {
"type": "string"
},
"encodeLevel": {
"type": "string"
},
"format": {
"type": "string"
},
"level": {
"type": "string"
},
"linkName": {
"type": "string"
},
"logInConsole": {
"type": "boolean"
},
"prefix": {
"type": "string"
},
"showLine": {
"type": "boolean"
},
"stacktraceKey": {
"type": "string"
}
}
},
"model.AutoCodeStruct": {
"type": "object",
"properties": {
@ -2954,7 +3162,7 @@
"description": "是否是完结流节点",
"type": "boolean"
},
"isStrat": {
"isStart": {
"description": "是否是开始流节点",
"type": "boolean"
},

215
server/docs/swagger.yaml

@ -14,38 +14,61 @@ definitions:
modelPath:
type: string
type: object
config.Email:
properties:
from:
type: string
host:
type: string
isSSL:
type: boolean
nickname:
type: string
port:
type: integer
secret:
type: string
to:
type: string
type: object
config.JWT:
properties:
signingKey:
type: string
type: object
config.LocalUpload:
config.Local:
properties:
avatarPath:
type: string
filePath:
path:
type: string
local:
type: boolean
type: object
config.Log:
config.Mysql:
properties:
file:
config:
type: string
logFile:
dbname:
type: string
logMode:
type: boolean
prefix:
maxIdleConns:
type: integer
maxOpenConns:
type: integer
password:
type: string
path:
type: string
stdout:
username:
type: string
type: object
config.Mysql:
config.Postgresql:
properties:
config:
type: string
dbname:
type: string
logMode:
host:
type: string
logger:
type: boolean
maxIdleConns:
type: integer
@ -53,8 +76,10 @@ definitions:
type: integer
password:
type: string
path:
port:
type: string
preferSimpleProtocol:
type: boolean
username:
type: string
type: object
@ -68,6 +93,12 @@ definitions:
type: string
secretKey:
type: string
useCdnDomains:
type: boolean
useHttps:
type: boolean
zone:
type: string
type: object
config.Redis:
properties:
@ -86,17 +117,22 @@ definitions:
casbin:
$ref: '#/definitions/config.Casbin'
type: object
email:
$ref: '#/definitions/config.Email'
type: object
jwt:
$ref: '#/definitions/config.JWT'
type: object
localUpload:
$ref: '#/definitions/config.LocalUpload'
type: object
log:
$ref: '#/definitions/config.Log'
local:
$ref: '#/definitions/config.Local'
description: oss
type: object
mysql:
$ref: '#/definitions/config.Mysql'
description: gorm
type: object
postgresql:
$ref: '#/definitions/config.Postgresql'
type: object
qiniu:
$ref: '#/definitions/config.Qiniu'
@ -107,16 +143,37 @@ definitions:
sqlite:
$ref: '#/definitions/config.Sqlite'
type: object
sqlserver:
$ref: '#/definitions/config.Sqlserver'
type: object
system:
$ref: '#/definitions/config.System'
type: object
zap:
$ref: '#/definitions/config.Zap'
type: object
type: object
config.Sqlite:
properties:
config:
logger:
type: boolean
maxIdleConns:
type: integer
maxOpenConns:
type: integer
path:
type: string
logMode:
type: object
config.Sqlserver:
properties:
dbname:
type: string
logger:
type: boolean
maxIdleConns:
type: integer
maxOpenConns:
type: integer
password:
type: string
path:
@ -132,9 +189,34 @@ definitions:
type: string
env:
type: string
needInitData:
type: boolean
ossType:
type: string
useMultipoint:
type: boolean
type: object
config.Zap:
properties:
director:
type: string
encodeLevel:
type: string
format:
type: string
level:
type: string
linkName:
type: string
logInConsole:
type: boolean
prefix:
type: string
showLine:
type: boolean
stacktraceKey:
type: string
type: object
model.AutoCodeStruct:
properties:
abbreviation:
@ -378,7 +460,7 @@ definitions:
isEnd:
description: 是否是完结流节点
type: boolean
isStrat:
isStart:
description: 是否是开始流节点
type: boolean
stepAuthorityID:
@ -919,25 +1001,6 @@ paths:
summary: 用户登录
tags:
- Base
/base/register:
post:
parameters:
- description: 用户注册接口
in: body
name: data
required: true
schema:
$ref: '#/definitions/model.SysUser'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"注册成功"}'
schema:
type: string
summary: 用户注册账号
tags:
- Base
/casbin/UpdateCasbin:
post:
consumes:
@ -1096,6 +1159,20 @@ paths:
summary: 获取权限客户列表
tags:
- SysApi
/email/emailTest:
post:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"返回成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 发送测试邮件
tags:
- system
/fileUploadAndDownload/breakpointContinue:
post:
consumes:
@ -1870,6 +1947,20 @@ paths:
summary: 设置配置文件内容
tags:
- system
/system/getServerInfo:
post:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 获取服务器信息
tags:
- system
/system/getSystemConfig:
post:
produces:
@ -1972,6 +2063,25 @@ paths:
summary: 分页获取用户列表
tags:
- SysUser
/user/register:
post:
parameters:
- description: 用户注册接口
in: body
name: data
required: true
schema:
$ref: '#/definitions/model.SysUser'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"注册成功"}'
schema:
type: string
summary: 用户注册账号
tags:
- Base
/user/setUserAuthority:
post:
consumes:
@ -1995,6 +2105,29 @@ paths:
summary: 设置用户权限
tags:
- SysUser
/user/setUserInfo:
put:
consumes:
- application/json
parameters:
- description: 删除用户
in: body
name: data
required: true
schema:
$ref: '#/definitions/model.SysUser'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改成功"}'
schema:
type: string
security:
- ApiKeyAuth: []
summary: 删除用户
tags:
- SysUser
/workflow/createWorkFlow:
post:
parameters:

8
server/gva/init_data/init_data.go

@ -24,7 +24,7 @@ func InitSysApi() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.SysApi{
{gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/base/login", "用户登录", "base", "POST"},
{gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/base/register", "用户注册", "base", "POST"},
{gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/user/register", "用户注册", "user", "POST"},
{gorm.Model{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/createApi", "创建api", "api", "POST"},
{gorm.Model{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiList", "获取api列表", "api", "POST"},
{gorm.Model{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, "/api/getApiById", "获取api详细信息", "api", "POST"},
@ -128,7 +128,7 @@ func InitCasbinModel() (err error) {
tx := global.GVA_DB.Begin() // 开始事务
insert := []model.CasbinModel{
{"p", "888", "/base/login", "POST"},
{"p", "888", "/base/register", "POST"},
{"p", "888", "/user/register", "POST"},
{"p", "888", "/api/createApi", "POST"},
{"p", "888", "/api/getApiList", "POST"},
{"p", "888", "/api/getApiById", "POST"},
@ -192,7 +192,7 @@ func InitCasbinModel() (err error) {
{"p", "888", "/user/setUserInfo", "PUT"},
{"p", "888", "/email/emailTest", "POST"},
{"p", "8881", "/base/login", "POST"},
{"p", "8881", "/base/register", "POST"},
{"p", "8881", "/user/register", "POST"},
{"p", "8881", "/api/createApi", "POST"},
{"p", "8881", "/api/getApiList", "POST"},
{"p", "8881", "/api/getApiById", "POST"},
@ -229,7 +229,7 @@ func InitCasbinModel() (err error) {
{"p", "8881", "/customer/customer", "GET"},
{"p", "8881", "/customer/customerList", "GET"},
{"p", "9528", "/base/login", "POST"},
{"p", "9528", "/base/register", "POST"},
{"p", "9528", "/user/register", "POST"},
{"p", "9528", "/api/createApi", "POST"},
{"p", "9528", "/api/getApiList", "POST"},
{"p", "9528", "/api/getApiById", "POST"},

1
server/router/sys_base.go

@ -8,7 +8,6 @@ import (
func InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
BaseRouter := Router.Group("base")
{
BaseRouter.POST("register", v1.Register)
BaseRouter.POST("login", v1.Login)
BaseRouter.POST("captcha", v1.Captcha)
}

1
server/router/sys_user.go

@ -12,6 +12,7 @@ func InitUserRouter(Router *gin.RouterGroup) {
Use(middleware.CasbinHandler()).
Use(middleware.OperationRecord())
{
UserRouter.POST("register", v1.Register)
UserRouter.POST("changePassword", v1.ChangePassword) // 修改密码
UserRouter.POST("getUserList", v1.GetUserList) // 分页获取用户列表
UserRouter.POST("setUserAuthority", v1.SetUserAuthority) // 设置用户权限

Loading…
Cancel
Save