From fb3fda97369b9ad3afc773838c7da99843347855 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Apr 2019 09:58:39 +0200 Subject: More Mojo::Pg migrations --- lib/Travelynx/Controller/Account.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Travelynx/Controller') 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'); } -- cgit v1.2.3