Skip to content

Commit 5664a4b

Browse files
authored
Merge pull request #44 from Gyarbij/40-error-after-switching-from-azure-mode-to-openai-mode
refactor: move health check endpoint
2 parents 67980e8 + 3355b1f commit 5664a4b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ func init() {
8080
func main() {
8181
router := gin.Default()
8282

83-
// Health check endpoint
84-
router.GET("/healthz", func(c *gin.Context) {
85-
c.JSON(http.StatusOK, gin.H{
86-
"status": "healthy",
87-
})
88-
})
89-
9083
// Proxy routes
9184
if ProxyMode == "azure" {
9285
router.GET("/v1/models", handleGetModels)
@@ -122,6 +115,13 @@ func main() {
122115
router.Any("*path", handleOpenAIProxy)
123116
}
124117

118+
// Health check endpoint
119+
router.GET("/healthz", func(c *gin.Context) {
120+
c.JSON(http.StatusOK, gin.H{
121+
"status": "healthy",
122+
})
123+
})
124+
125125
router.Run(Address)
126126
}
127127

0 commit comments

Comments
 (0)