You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/apiresp/gin.go

15 lines
242 B

2 years ago
package apiresp
import (
"github.com/gin-gonic/gin"
"net/http"
)
func GinError(c *gin.Context, err error) {
2 years ago
c.JSON(http.StatusOK, ParseError(err))
2 years ago
}
func GinSuccess(c *gin.Context, data any) {
2 years ago
c.JSON(http.StatusOK, ApiSuccess(data))
2 years ago
}