优化结构
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package httpx
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
shared "kra/pkg/httpx"
|
||||
)
|
||||
|
||||
const (
|
||||
CodeSuccess = shared.CodeSuccess
|
||||
CodeError = shared.CodeError
|
||||
CodePasswordChangeRequired = shared.CodePasswordChangeRequired
|
||||
)
|
||||
|
||||
type Response = shared.Response
|
||||
type PageResult = shared.PageResult
|
||||
|
||||
func Write(c *gin.Context, code int, data any, message string) {
|
||||
shared.Write(c, code, data, message)
|
||||
}
|
||||
|
||||
func OK(c *gin.Context) { shared.OK(c) }
|
||||
|
||||
func OKWithData(c *gin.Context, data any) { shared.OKWithData(c, data) }
|
||||
|
||||
func Fail(c *gin.Context, message string) { shared.Fail(c, message) }
|
||||
|
||||
func NoAuth(c *gin.Context, message string) {
|
||||
shared.NoAuth(c, message)
|
||||
}
|
||||
Reference in New Issue
Block a user