From 72b20b4351bab9d6865a43b84561ed2f1528d765 Mon Sep 17 00:00:00 2001 From: Zach Date: Mon, 13 May 2024 12:35:21 -0500 Subject: [PATCH] minor cleaning and variable clarity --- lib/models/account-template.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/models/account-template.js b/lib/models/account-template.js index 04dd8809..227832e2 100644 --- a/lib/models/account-template.js +++ b/lib/models/account-template.js @@ -41,11 +41,7 @@ class AccountTemplate { * @throws if hostname already registered */ static registerHostname (hostname) { - // if (this.hostname) { - // throw new Error('hostname already registered') - // } else { this.hostname = hostname - // } } /** @@ -85,17 +81,17 @@ class AccountTemplate { * @return {Object} */ static templateSubstitutionsFor (userAccount) { - let realWebId + let podRelativeWebId // this means the user's webId and server Uri are the same - // therefore, we use a relative address + // therefore, we use a relative uri ref if (userAccount.webId.indexOf(this.hostname) > -1) { - realWebId = path.join('/', userAccount.webId.substring(userAccount.webId.indexOf(this.hostname) + this.hostname.length)) + podRelativeWebId = path.join('/', userAccount.webId.substring(userAccount.webId.indexOf(this.hostname) + this.hostname.length)) } else { - realWebId = userAccount.webId + podRelativeWebId = userAccount.webId } const substitutions = { name: userAccount.displayName, - webId: realWebId, // userAccount.webId, + webId: podRelativeWebId, email: userAccount.email, idp: userAccount.idp }