@saltcorn/mobile-app 0.7.4-beta.2 → 0.7.4

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saltcorn/mobile-app",
3
3
  "displayName": "Saltcorn mobile app",
4
- "version": "0.7.4-beta.2",
4
+ "version": "0.7.4",
5
5
  "description": "Apache Cordova application with @saltcorn/markup",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -27,6 +27,7 @@ async function apiCall({ method, path, params, body, responseType }) {
27
27
  "X-Requested-With": "XMLHttpRequest",
28
28
  "X-Saltcorn-Client": "mobile-app",
29
29
  };
30
+ if (config.tenantAppName) headers["X-Saltcorn-App"] = config.tenantAppName;
30
31
  const token = localStorage.getItem("auth_jwt");
31
32
  if (token) headers.Authorization = `jwt ${token}`;
32
33
  try {
@@ -7,7 +7,7 @@ const historyFile = "update_history";
7
7
  async function dropDeletedTables(incomingTables) {
8
8
  const existingTables = await saltcorn.data.models.Table.find();
9
9
  for (const table of existingTables) {
10
- if (!incomingTables.find((row) => row.id === table.id)) {
10
+ if (table.name !== "users" && !incomingTables.find((row) => row.id === table.id)) {
11
11
  saltcorn.data.db.query(`DROP TABLE ${table.name}`);
12
12
  }
13
13
  }