Skip to content

Commit 72b20b4

Browse files
committed
minor cleaning and variable clarity
1 parent b795602 commit 72b20b4

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

lib/models/account-template.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ class AccountTemplate {
4141
* @throws if hostname already registered
4242
*/
4343
static registerHostname (hostname) {
44-
// if (this.hostname) {
45-
// throw new Error('hostname already registered')
46-
// } else {
4744
this.hostname = hostname
48-
// }
4945
}
5046

5147
/**
@@ -85,17 +81,17 @@ class AccountTemplate {
8581
* @return {Object}
8682
*/
8783
static templateSubstitutionsFor (userAccount) {
88-
let realWebId
84+
let podRelativeWebId
8985
// this means the user's webId and server Uri are the same
90-
// therefore, we use a relative address
86+
// therefore, we use a relative uri ref
9187
if (userAccount.webId.indexOf(this.hostname) > -1) {
92-
realWebId = path.join('/', userAccount.webId.substring(userAccount.webId.indexOf(this.hostname) + this.hostname.length))
88+
podRelativeWebId = path.join('/', userAccount.webId.substring(userAccount.webId.indexOf(this.hostname) + this.hostname.length))
9389
} else {
94-
realWebId = userAccount.webId
90+
podRelativeWebId = userAccount.webId
9591
}
9692
const substitutions = {
9793
name: userAccount.displayName,
98-
webId: realWebId, // userAccount.webId,
94+
webId: podRelativeWebId,
9995
email: userAccount.email,
10096
idp: userAccount.idp
10197
}

0 commit comments

Comments
 (0)