v0.0.175
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/ginext/commonapierr"
|
||||
json "gogs.mikescher.com/BlackForestBytes/goext/gojson"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"runtime/debug"
|
||||
@@ -103,15 +102,15 @@ func Redirect(sc int, newURL string) HTTPResponse {
|
||||
return &redirectHTTPResponse{statusCode: sc, url: newURL}
|
||||
}
|
||||
|
||||
func APIError(g *gin.Context, errcode commonapierr.APIErrorCode, msg string, e error) HTTPResponse {
|
||||
func APIError(g *gin.Context, errcode commonApiErr.APIErrorCode, msg string, e error) HTTPResponse {
|
||||
return createApiError(g, errcode, msg, e)
|
||||
}
|
||||
|
||||
func NotImplemented(g *gin.Context) HTTPResponse {
|
||||
return createApiError(g, commonapierr.NotImplemented, "", nil)
|
||||
return createApiError(g, commonApiErr.NotImplemented, "", nil)
|
||||
}
|
||||
|
||||
func createApiError(g *gin.Context, errcode commonapierr.APIErrorCode, msg string, e error) HTTPResponse {
|
||||
func createApiError(g *gin.Context, errcode commonApiErr.APIErrorCode, msg string, e error) HTTPResponse {
|
||||
reqUri := ""
|
||||
if g != nil && g.Request != nil {
|
||||
reqUri = g.Request.Method + " :: " + g.Request.RequestURI
|
||||
|
Reference in New Issue
Block a user