mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 18:53:43 +08:00
优化系统设置 API 参数解析,优化点卡扣费逻辑,没有回复答案不记扣费次数
This commit is contained in:
@@ -81,7 +81,7 @@ func (s *Server) Run(webRoot embed.FS, path string, debug bool) {
|
||||
engine.Use(AuthorizeMiddleware(s))
|
||||
engine.Use(Recover)
|
||||
|
||||
engine.GET("/hello", Hello)
|
||||
engine.POST("/test", s.TestHandle)
|
||||
engine.GET("/api/session/get", s.GetSessionHandle)
|
||||
engine.POST("/api/login", s.LoginHandle)
|
||||
engine.Any("/api/chat", s.ChatHandle)
|
||||
@@ -287,7 +287,3 @@ func (s *Server) LoginHandle(c *gin.Context) {
|
||||
s.ChatSession[sessionId] = types.ChatSession{ClientIP: c.ClientIP(), Username: data.Token, SessionId: sessionId}
|
||||
c.JSON(http.StatusOK, types.BizVo{Code: types.Success, Data: sessionId})
|
||||
}
|
||||
|
||||
func Hello(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, types.BizVo{Code: types.Success, Message: "HELLO, ChatGPT !!!"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user