mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 07:24:31 +01:00
fix(api): conditionally set Gin mode to release based on debug flag
This commit is contained in:
@@ -40,7 +40,9 @@ import (
|
||||
// @externalDocs.description GoDoxy Docs
|
||||
// @externalDocs.url https://docs.godoxy.dev
|
||||
func NewHandler() *gin.Engine {
|
||||
gin.SetMode("release")
|
||||
if !common.IsDebug {
|
||||
gin.SetMode("release")
|
||||
}
|
||||
r := gin.New()
|
||||
r.Use(ErrorHandler())
|
||||
r.Use(ErrorLoggingMiddleware())
|
||||
|
||||
Reference in New Issue
Block a user