19 lines
298 B
Go
19 lines
298 B
Go
|
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")
|
||
|
}
|