Skip to content
This repository was archived by the owner on Jul 15, 2020. It is now read-only.

Commit 65af4cd

Browse files
committed
Bugfix for newly refactored delete account endpoint
1 parent 4f37cb1 commit 65af4cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-starter",
3-
"version": "4.5.0",
3+
"version": "4.5.1",
44
"description": "A starter Next.js project with email and oAuth authentication",
55
"author": "Iain Collins <[email protected]>",
66
"license": "ISC",

routes/account.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = (expressApp, functions) => {
6262
// Expose a route to allow users to delete their profile.
6363
expressApp.post('/account/delete', (req, res) => {
6464
if (req.user) {
65-
functions.remove(id)
65+
functions.remove(req.user.id)
6666
.then(() => {
6767
// Destroy local session after deleting account
6868
req.logout()

0 commit comments

Comments
 (0)