summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-22 09:58:39 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-22 09:58:39 +0200
commitfb3fda97369b9ad3afc773838c7da99843347855 (patch)
tree8afc07449dca52ba440df8e501cd8376f868b1cb /lib/Travelynx/Controller
parenteaf3f451c53278e0b2141580924b05f9e6943e32 (diff)
More Mojo::Pg migrations
Diffstat (limited to 'lib/Travelynx/Controller')
-rw-r--r--lib/Travelynx/Controller/Account.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index 8626dc8..7753493 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -182,8 +182,6 @@ sub delete {
return;
}
- my $now = DateTime->now( time_zone => 'Europe/Berlin' )->epoch;
-
if ( $self->param('action') eq 'delete' ) {
if (
not $self->authenticate(
@@ -195,12 +193,10 @@ sub delete {
$self->render( 'account', invalid => 'password' );
return;
}
- $self->app->mark_for_deletion_query->execute( $now,
- $self->current_user->{id} );
+ $self->flag_user_deletion( $self->current_user->{id} );
}
else {
- $self->app->mark_for_deletion_query->execute( undef,
- $self->current_user->{id} );
+ $self->unflag_user_deletion( $self->current_user->{id} );
}
$self->redirect_to('account');
}