Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
linweiyuan committed Jun 18, 2023
1 parent 0343815 commit f3fd63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ func main() {
setupChatGPTAPIs(router)
setupPlatformAPIs(router)

router.NoRoute(api.Proxy)

router.GET("/healthCheck", api.HealthCheck)

port := os.Getenv("GO_CHATGPT_API_PORT")
Expand All @@ -49,7 +51,6 @@ func setupChatGPTAPIs(router *gin.Engine) {
conversationGroup.POST("", chatgpt.CreateConversation)
}
}
router.NoRoute(api.Proxy)
}

func setupPlatformAPIs(router *gin.Engine) {
Expand All @@ -63,5 +64,4 @@ func setupPlatformAPIs(router *gin.Engine) {
apiGroup.POST("/completions", platform.CreateCompletions)
}
}
router.NoRoute(api.Proxy)
}

0 comments on commit f3fd63f

Please sign in to comment.