parent
a70efc8203
commit
c61aebab73
@ -1,18 +1,13 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/zggsong/gin-vue-demo/dto"
|
||||
"github.com/zggsong/gin-vue-demo/model"
|
||||
"github.com/zggsong/gin-vue-demo/response"
|
||||
)
|
||||
|
||||
func Info(ctx *gin.Context) {
|
||||
user, _ := ctx.Get("user")
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": http.StatusOK,
|
||||
"data": gin.H{"user": dto.ToUserDto(user.(model.User))},
|
||||
})
|
||||
response.Success(ctx, gin.H{"user": dto.ToUserDto(user.(model.User))}, "")
|
||||
}
|
||||
|
Loading…
Reference in new issue