go_gin_tmpl/api/admin/user.go

19 lines
298 B
Go
Raw Normal View History

2022-05-09 09:00:14 +08:00
package admin
import (
"ginDemo/core"
"github.com/gin-gonic/gin"
)
type userApi struct{}
// UserApi 角色接口工厂函数
func UserApi() *userApi {
return &userApi{}
}
// GetUser 获取当前登录用户信息
func (u userApi) GetUser(ctx *gin.Context) {
core.R(ctx).OkWithData("Lee")
}