Skip to content

Commit

Permalink
add function dirextly and remove import breeaking build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpeterson91 committed Jul 15, 2024
1 parent 0a50426 commit d00c509
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/daemons/src/autoUpdates/formatNotificationBody.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { CoreUpdateDataAvailable } from "@dappnode/types";
import { urlJoin, prettyDnpName } from "@dappnode/utils";
import { getInstallerPath } from "../../../admin-ui/src/pages/installer/data.js";
//import { getInstallerPath } from "../../../admin-ui/src/pages/installer/data.js";

const adminUiUpdateCoreUrl = "http://my.dappnode/system/update";
const adminUiInstallPackageUrl = "http://my.dappnode";
//const adminUiInstallPackageUrl = "http://my.dappnode";
const getInstallerPath = (dnpName: string) => {
if (dnpName.includes("public")) return "http://my.dappnode/installer/public";
return "http://my.dappnode/installer/dnp";
};

export function formatPackageUpdateNotification({
dnpName,
Expand All @@ -19,7 +23,7 @@ export function formatPackageUpdateNotification({
autoUpdatesEnabled: boolean;
}): string {
const prettyName = prettyDnpName(dnpName);
const installUrl = urlJoin(adminUiInstallPackageUrl, getInstallerPath(dnpName), dnpName);
const installUrl = urlJoin(getInstallerPath(dnpName), dnpName);

return [
`New version ready to install for ${prettyName} (current version ${currentVersion})`,
Expand Down

0 comments on commit d00c509

Please sign in to comment.