mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-17 13:43:42 +08:00
✨ feat: support paging / sorting (#64)
* ✨ feat: support paging / sorting * 🔥 del: delete unused files
This commit is contained in:
@@ -67,3 +67,10 @@ func AbortWithMessage(c *gin.Context, statusCode int, message string) {
|
||||
c.Abort()
|
||||
LogError(c.Request.Context(), message)
|
||||
}
|
||||
|
||||
func APIRespondWithError(c *gin.Context, status int, err error) {
|
||||
c.JSON(status, gin.H{
|
||||
"success": false,
|
||||
"message": err.Error(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user