修改返回值
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) {
|
func result(code int, data interface{}, msg string, c *gin.Context) {
|
||||||
if data == nil {
|
//if data == nil {
|
||||||
data = gin.H{}
|
// data = gin.H{}
|
||||||
}
|
//}
|
||||||
c.JSON(http.StatusOK, res{
|
c.JSON(http.StatusOK, res{
|
||||||
code,
|
code,
|
||||||
data,
|
data,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user