feat:完善项目
This commit is contained in:
@ -10,12 +10,12 @@ type User struct{}
|
||||
|
||||
func (*User) Info(c *gin.Context) {
|
||||
data := user.NewInstance()(getSession()(c).(*service.Session)).Info()
|
||||
APIResponse(nil, data)
|
||||
APIResponse(nil, data)(c)
|
||||
}
|
||||
|
||||
func (*User) Menu(c *gin.Context) {
|
||||
data, err := user.NewMenu()(getSession()(c).(*service.Session)).Menu()
|
||||
APIResponse(err, data)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*User) List(c *gin.Context) {
|
||||
@ -31,7 +31,7 @@ func (*User) List(c *gin.Context) {
|
||||
}
|
||||
data, err := user.NewInstance()(getSession()(c).(*service.Session)).List(form.Name, form.Mobile, form.TenantID,
|
||||
form.Page, form.PageSize)
|
||||
APIResponse(err, data)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*User) Add(c *gin.Context) {
|
||||
@ -47,7 +47,7 @@ func (*User) Add(c *gin.Context) {
|
||||
}
|
||||
data, err := user.NewInstance()(getSession()(c).(*service.Session)).List(form.Name, form.Mobile, form.TenantID,
|
||||
form.Page, form.PageSize)
|
||||
APIResponse(err, data)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*User) Edit(c *gin.Context) {
|
||||
@ -63,5 +63,5 @@ func (*User) Edit(c *gin.Context) {
|
||||
}
|
||||
data, err := user.NewInstance()(getSession()(c).(*service.Session)).List(form.Name, form.Mobile, form.TenantID,
|
||||
form.Page, form.PageSize)
|
||||
APIResponse(err, data)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user