@openinc/parse-server-opendash 3.29.4 → 3.29.5

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.
@@ -10,8 +10,9 @@ const config_1 = require("../../config");
10
10
  async function getTicketLink(ticket, user) {
11
11
  //Get hostname from tenant or environment variable or default to localhost
12
12
  let hostname = "localhost";
13
+ const tenant = (await user.fetchWithInclude("tenant", { useMasterKey: true })).get("tenant");
13
14
  try {
14
- const baseurl = user.get("tenant")?.get("baseUrl");
15
+ const baseurl = tenant?.get("baseUrl");
15
16
  const publicurl = config_1.ConfigInstance.getInstance()
16
17
  .get("PARSE_PUBLIC_SERVER_URL")
17
18
  .replace("/parse", "");
@@ -23,7 +24,7 @@ async function getTicketLink(ticket, user) {
23
24
  }
24
25
  }
25
26
  catch (error) {
26
- console.warn("[@openinc/parse-server-opendash] Could not get PARSE_PUBLIC_SERVER_URL from config, defaulting to localhost");
27
+ console.warn("[@openinc/parse-server-opendash] Could not get a hostname, defaulting to localhost");
27
28
  }
28
29
  return `${hostname}/openservice/ticket/${ticket.id}`;
29
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "3.29.4",
3
+ "version": "3.29.5",
4
4
  "description": "Parse Server Cloud Code for open.INC Stack.",
5
5
  "packageManager": "pnpm@10.20.0",
6
6
  "keywords": [