🎨服务端的初始化
This commit is contained in:
@@ -5,10 +5,10 @@ import (
|
||||
"wireguard-dashboard/http/api"
|
||||
)
|
||||
|
||||
// Captcha
|
||||
// CaptchaApi
|
||||
// @description: 验证码
|
||||
// @param r
|
||||
func Captcha(r *gin.Engine) {
|
||||
func CaptchaApi(r *gin.Engine) {
|
||||
captcha := r.Group("captcha")
|
||||
{
|
||||
captcha.GET("", api.Captcha().GenerateCaptcha) // 生成验证码
|
||||
|
14
route/server.go
Normal file
14
route/server.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package route
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"wireguard-dashboard/http/api"
|
||||
"wireguard-dashboard/middleware"
|
||||
)
|
||||
|
||||
func ServerApi(r *gin.Engine) {
|
||||
apiGroup := r.Group("server", middleware.Authorization())
|
||||
{
|
||||
apiGroup.GET("", api.Server().GetServer) // 获取服务端信息
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user