Obsolete
/
dnsmanagerv1
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
dnsmanagerv1/app/bdd/admin.pm

34 lines
642 B
Perl
Raw Normal View History

package app::bdd::admin;
use Moose;
extends 'app::bdd::lambda';
# ($success) activate_zone($domain)
sub activate_zone {
my ($self, $domain) = @_;
}
# ($success) delete_zone($file_path)
sub delete_zone {
my ($self, $domain) = @_;
}
2014-01-25 02:33:38 +01:00
# $success delete_domain
sub delete_domain {
my ($self, $domain) = @_;
my $sth;
$sth = $self->dbh->prepare('delete from domain where domain=?');
unless ( $sth->execute($domain) ) {
$sth->finish();
return 0;
}
$sth->finish();
# delete the domain from our domains
@{ $self->domains } = grep { $_ ne $domain } @{ $self->domains };
return 1;
}
1;