This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2014-01-20 01:08:03 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-01-20 01:08:03 +01:00
|
|
|
1;
|