feat: delete useless

This commit is contained in:
engigu
2024-01-01 13:09:44 +08:00
parent 965ea46643
commit d8f8927c7c
14 changed files with 44 additions and 193 deletions
-12
View File
@@ -3,8 +3,6 @@ package app
import (
"github.com/gin-gonic/gin"
"net/http"
"message-nest/pkg/e"
)
type Gin struct {
@@ -17,16 +15,6 @@ type Response struct {
Data interface{} `json:"data"`
}
// Response setting gin.JSON
func (g *Gin) Response(httpCode, errCode int, data interface{}) {
g.C.JSON(httpCode, Response{
Code: errCode,
Msg: e.GetMsg(errCode),
Data: data,
})
return
}
func (g *Gin) CResponse(errCode int, Msg string, data interface{}) {
g.C.JSON(http.StatusOK, Response{
Code: errCode,