修复
This commit is contained in:
@@ -18,9 +18,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// abortCodex is a helper function to abort requests with a specific message.
|
// abortCodex is a helper function to abort requests with a specific status code.
|
||||||
func abortCodex(c *gin.Context, message string) {
|
func abortCodex(c *gin.Context, statusCode int) {
|
||||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": message})
|
c.AbortWithStatusJSON(statusCode, gin.H{"error": "Request failed"})
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetEngine returns information about a specific engine.
|
// GetEngine returns information about a specific engine.
|
||||||
|
|||||||
Reference in New Issue
Block a user