mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
5ec628fccb
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
16 lines
243 B
Go
16 lines
243 B
Go
package apiresp
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
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))
|
|
}
|