diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-01-22 12:44:19 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-01-22 12:44:19 +0100 |
commit | 1c63574245bd309c879c8f2914dfec9d67a48486 (patch) | |
tree | bb2778d781c5d5db4a330b2787c12fc50c108cbc /lib/Travelynx/Command/account.pm | |
parent | e98fc8493fee2135b8ff3a33521969d7d79a2988 (diff) |
users: rename "add_user" to "add" and "get_data" to "get"
Diffstat (limited to 'lib/Travelynx/Command/account.pm')
-rw-r--r-- | lib/Travelynx/Command/account.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Travelynx/Command/account.pm b/lib/Travelynx/Command/account.pm index 6cd3498..1cd58bd 100644 --- a/lib/Travelynx/Command/account.pm +++ b/lib/Travelynx/Command/account.pm @@ -5,7 +5,7 @@ package Travelynx::Command::account; # SPDX-License-Identifier: AGPL-3.0-or-later use Mojo::Base 'Mojolicious::Command'; use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); -use UUID::Tiny qw(:std); +use UUID::Tiny qw(:std); has description => 'Add or remove user accounts'; @@ -34,7 +34,7 @@ sub add_user { my $password_hash = hash_password($password); my $tx = $db->begin; - my $user_id = $self->app->users->add_user( + my $user_id = $self->app->users->add( db => $db, name => $name, email => $email, @@ -58,7 +58,7 @@ sub add_user { sub delete_user { my ( $self, $uid ) = @_; - my $user_data = $self->app->users->get_data( uid => $uid ); + my $user_data = $self->app->users->get( uid => $uid ); if ( not $user_data ) { say "UID $uid does not exist."; @@ -73,7 +73,7 @@ sub delete_user { sub really_delete_user { my ( $self, $uid, $name ) = @_; - my $user_data = $self->app->users->get_data( uid => $uid ); + my $user_data = $self->app->users->get( uid => $uid ); if ( $user_data->{name} ne $name ) { say |