فهرست منبع

fix jwt in web (#545)

zxhlyh 1 سال پیش
والد
کامیت
9af0da4450
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 2 1
      web/app/components/share/chat/index.tsx
  2. 2 1
      web/app/components/share/text-generation/index.tsx

+ 2 - 1
web/app/components/share/chat/index.tsx

@@ -310,7 +310,8 @@ const Main: FC<IMainProps> = ({
   }
 
   const fetchInitData = async () => {
-    await checkOrSetAccessToken()
+    if (!isInstalledApp)
+      await checkOrSetAccessToken()
 
     return Promise.all([isInstalledApp
       ? {

+ 2 - 1
web/app/components/share/text-generation/index.tsx

@@ -255,7 +255,8 @@ const TextGeneration: FC<IMainProps> = ({
   }
 
   const fetchInitData = async () => {
-    await checkOrSetAccessToken()
+    if (!isInstalledApp)
+      await checkOrSetAccessToken()
 
     return Promise.all([isInstalledApp
       ? {