Files
open-im-server/pkg/apiresp/gin.go
T

16 lines
243 B
Go
Raw Normal View History

2023-06-30 09:45:02 +08:00
package apiresp
import (
"net/http"
2023-07-03 14:12:29 +08:00
"github.com/gin-gonic/gin"
2023-06-30 09:45:02 +08:00
)
func GinError(c *gin.Context, err error) {
c.JSON(http.StatusOK, ParseError(err))
}
func GinSuccess(c *gin.Context, data any) {
c.JSON(http.StatusOK, ApiSuccess(data))
}