From 48a289d2a8a84fc71141027e9e57ad31df0f8e19 Mon Sep 17 00:00:00 2001 From: liuhuapiaoyuan <278780765@qq.com> Date: Sat, 6 Jan 2024 21:10:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E8=A1=A5=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9C=AA=E5=AF=B9=E6=8E=A5=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend-api/backend-api.go | 2 ++ backend-api/next_data_gpts_fixed.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 backend-api/next_data_gpts_fixed.go diff --git a/backend-api/backend-api.go b/backend-api/backend-api.go index 2e27673..468f754 100644 --- a/backend-api/backend-api.go +++ b/backend-api/backend-api.go @@ -28,6 +28,7 @@ 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) // 禁用支付 @@ -35,6 +36,7 @@ func init() { backendGroup.GET("/me", Me) backendGroup.GET("/conversations", Conversations) backendGroup.GET("/prompt_library", Prompt_library) + backendGroup.GET("/upgrade_invites", NextDataGptsFixed) } diff --git a/backend-api/next_data_gpts_fixed.go b/backend-api/next_data_gpts_fixed.go new file mode 100644 index 0000000..9500576 --- /dev/null +++ b/backend-api/next_data_gpts_fixed.go @@ -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) +}