kubbot & kubecub 539e0fdfb6 feat: use robot to migrate code
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
2023-06-30 09:45:02 +08:00

15 lines
242 B
Go

package apiresp
import (
"github.com/gin-gonic/gin"
"net/http"
)
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))
}