Skip to content

Commit b9fb76a

Browse files
committed
Merge branch 'feature/delete-pod' of https://github.com/solid/node-solid-server into feature/delete-pod
2 parents 789942e + 0c15563 commit b9fb76a

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

lib/models/account-manager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,10 @@ class AccountManager {
430430
* @return {string} Generated token
431431
*/
432432
generateDeleteToken (userAccount) {
433-
return this.tokenService.generate('delete-account', { webId: userAccount.webId })
433+
return this.tokenService.generate('delete-account', {
434+
webId: userAccount.webId,
435+
email: userAccount.email
436+
})
434437
}
435438

436439
/**

lib/requests/delete-account-confirm-request.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ class DeleteAccountConfirmRequest extends AuthRequest {
133133
let user = this.accountManager.userAccountFrom(tokenContents)
134134
let accountDir = this.accountManager.accountDirFor(user.username)
135135

136-
debug('Deleting account for user:', user.webId)
136+
debug('Preparing removal of account for user:', user)
137137

138138
return Promise.resolve().then(() => {
139139
this.userStore.deleteUser(user)
140140
.then(() => fs.remove(accountDir))
141-
.then(() => debug('Removed user' + user.username))
141+
.then(() => debug('Removed user ' + user.username))
142142
})
143143
}
144144

lib/requests/delete-account-request.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,6 @@ class DeleteAccountRequest extends AuthRequest {
138138
}
139139

140140
return new DeleteAccountRequest(options)
141-
// let options = AuthRequest.requestOptions(req, res)
142-
//
143-
// let locals = req.app.locals
144-
// let accountManager = locals.accountManager
145-
//
146-
// let body = req.body || {}
147-
//
148-
// options.username = body.username
149-
//
150-
// if (options.username) {
151-
// options.userAccount = accountManager.userAccountFrom(body)
152-
// }
153141
}
154142
}
155143

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"homepage": "https://github.com/solid/node-solid-server",
3939
"bugs": "https://github.com/solid/node-solid-server/issues",
4040
"dependencies": {
41-
"@solid/oidc-auth-manager": "^0.17.0",
41+
"@solid/oidc-auth-manager": "^0.17.1",
4242
"body-parser": "^1.18.3",
4343
"busboy": "^0.2.12",
4444
"camelize": "^1.0.0",

0 commit comments

Comments
 (0)