27 lines
450 B
Go
27 lines
450 B
Go
package api
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"wireguard-dashboard/http/param"
|
|
"wireguard-dashboard/utils"
|
|
)
|
|
|
|
type user struct{}
|
|
|
|
func UserApi() user {
|
|
return user{}
|
|
}
|
|
|
|
// Login
|
|
// @description: 登陆
|
|
// @receiver u
|
|
// @param c
|
|
func (u user) Login(c *gin.Context) {
|
|
var p param.Login
|
|
if err := c.ShouldBind(&p); err != nil {
|
|
utils.GinResponse(c).FailedWithErr("参数错误", err)
|
|
return
|
|
}
|
|
utils.GinResponse(c).OKWithData("不准")
|
|
}
|