Skip to content

Commit 63b92d4

Browse files
committed
Remove then block by passing callback through to requestPermanentDeletion
1 parent 3d391d9 commit 63b92d4

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/user.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,8 @@ export default class User {
5252
}
5353

5454
return this.find(params)
55-
.then((res) => this.requestPermanentDeletion(res.body.id))
56-
.then((res) => {
57-
if (f) {
58-
return f(null, res);
59-
}
60-
61-
return res;
62-
}).catch((err) => {
55+
.then((res) => this.requestPermanentDeletion(res.body.id, f))
56+
.catch((err) => {
6357
if (f) {
6458
return f(err);
6559
}

0 commit comments

Comments
 (0)