修改返回值
This commit is contained in:
parent
fbab0c40a7
commit
a44f3c0f75
@ -13,9 +13,9 @@ type res struct {
|
||||
}
|
||||
|
||||
func result(code int, data interface{}, msg string, c *gin.Context) {
|
||||
if data == nil {
|
||||
data = gin.H{}
|
||||
}
|
||||
//if data == nil {
|
||||
// data = gin.H{}
|
||||
//}
|
||||
c.JSON(http.StatusOK, res{
|
||||
code,
|
||||
data,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user