Skip to content
Snippets Groups Projects

Ban and artifacts snapshots

2 files
+ 31
31
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 11
11
@@ -62,22 +62,22 @@ class Snapshot extends Cli\Controller implements Interfaces\CliControllerInterfa
$snapshotCreated = $channelsManager->snapshot();
if ($snapshotCreated) {
if ($shouldDelete) {
$this->out('Created user snapshot! Deleting...');
if (!$snapshotCreated) {
throw new CliException('Error creating user snapshot.');
}
$deleted = $channelsManager->delete();
if ($shouldDelete) {
$this->out('Created user snapshot! Deleting...');
if ($deleted) {
$this->out('Deleted!');
} else {
throw new CliException('Error deleting user.');
}
$deleted = $channelsManager->delete();
if ($deleted) {
$this->out('Deleted!');
} else {
$this->out('Created user snapshot!');
throw new CliException('Error deleting user.');
}
} else {
throw new CliException('Error creating user snapshot.');
$this->out('Created user snapshot!');
}
return true;
Loading