Skip to content

Commit

Permalink
fix: 修补部分接口未对接造成的异常
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhuapiaoyuan committed Jan 6, 2024
1 parent b9ab10a commit 48a289d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend-api/backend-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ var (
func init() {
s := g.Server()
s.BindHandler("/backend-api/*any", ProxyAll)
s.BindHandler("/_next/data/*any", NextDataGptsFixed)
backendGroup := s.Group("/backend-api")
backendGroup.POST("/accounts/data_export", NotFound) // 禁用导出
backendGroup.POST("/payments/checkout", NotFound) // 禁用支付
// backendGroup.GET("/accounts/check/*any", accounts.Check)
backendGroup.GET("/me", Me)
backendGroup.GET("/conversations", Conversations)
backendGroup.GET("/prompt_library", Prompt_library)
backendGroup.GET("/upgrade_invites", NextDataGptsFixed)

}

Expand Down
14 changes: 14 additions & 0 deletions backend-api/next_data_gpts_fixed.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package backendapi

import (
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/net/ghttp"
)

func NextDataGptsFixed(r *ghttp.Request) {

resJson := gjson.New(`
{ }
`)
r.Response.WriteJson(resJson)
}

0 comments on commit 48a289d

Please sign in to comment.