Skip to content

Commit 27ba57b

Browse files
committed
account-delete-modal: use people-api
1 parent fd85d69 commit 27ba57b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/components/account-delete-modal.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default function(app) {
1111
public submitting = false;
1212
public succeeded = false;
1313

14-
static $inject = ['$http', '$scope', 'authService', 'config'];
15-
constructor(public $http, public $scope, public authService, public config) {}
14+
static $inject = ['$http', '$scope', 'authService', 'peopleApi'];
15+
constructor(public $http, public $scope, public authService, public peopleApi) {}
1616

1717
public hasError(field) {
1818
const form = this.$scope.accountDeleteForm;
@@ -23,8 +23,7 @@ export default function(app) {
2323
public submit() {
2424
this.submitting = true;
2525
this.succeeded = false;
26-
// TODO: fix URL
27-
this.$http.delete(this.config.apiUrl)
26+
this.peopleApi.deleteAccount(this.authService.user.id)
2827
.then(() => {
2928
this.succeeded = true;
3029
return this.close();

0 commit comments

Comments
 (0)