diff --git a/api/responses/base.go b/api/responses/base.go index 2f72562..b38e5aa 100644 --- a/api/responses/base.go +++ b/api/responses/base.go @@ -6,7 +6,7 @@ import ( "net/http" ) -type Response struct { +type res struct { Code int `json:"code"` Data interface{} `json:"data"` Message string `json:"message"` @@ -16,7 +16,7 @@ func Result(code int, data interface{}, msg string, c *gin.Context) { if data == nil { data = gin.H{} } - c.JSON(http.StatusOK, Response{ + c.JSON(http.StatusOK, res{ code, data, msg,