@xuda.io/xuda-widget-plugin-xuda-drive 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/runtime.mjs +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-widget-plugin-xuda-drive",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Xuda Drive widget plugin",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"
package/runtime.mjs CHANGED
@@ -506,6 +506,8 @@ export async function upload(fields, e) {
506
506
  }
507
507
 
508
508
  export async function viewer(fields, e) {
509
+ const { app_id, gtp_token, app_token } = SESSION_OBJ[e.SESSION_ID];
510
+
509
511
  await func.utils.load_js_on_demand(
510
512
  "https://cdn.tailwindcss.com?plugins=forms"
511
513
  );
@@ -557,7 +559,7 @@ export async function viewer(fields, e) {
557
559
 
558
560
  e.$containerP.html(html);
559
561
 
560
- let opt = {};
562
+ let opt = { app_id };
561
563
 
562
564
  try {
563
565
  let domain =
@@ -570,8 +572,8 @@ export async function viewer(fields, e) {
570
572
  headers: {
571
573
  Accept: "application/json",
572
574
  "Content-Type": "application/json",
573
- "xu-gtp-token": e._session.gtp_token,
574
- "xu-app-token": e._session.app_token,
575
+ "xu-gtp-token": gtp_token,
576
+ "xu-app-token": app_token,
575
577
  },
576
578
  body: JSON.stringify(opt),
577
579
  }