X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/f46e4d3108d944bcf86f5905780f1fcfd441c036..9f81b10b061382886a9c7e21ca941c11a6e4bee1:/src/shpub/Command/Delete.php diff --git a/src/shpub/Command/Delete.php b/src/shpub/Command/Delete.php index a13775a..7735e21 100644 --- a/src/shpub/Command/Delete.php +++ b/src/shpub/Command/Delete.php @@ -6,6 +6,7 @@ class Command_Delete extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('delete'); + static::addOptJson($cmd); $cmd->addArgument( 'url', [ @@ -23,8 +24,9 @@ class Command_Delete extends Command_AbstractProps } $req = new Request($this->cfg->host, $this->cfg); - $req->req->addPostParameter('action', 'delete'); - $req->req->addPostParameter('url', $url); + $this->handleOptJson($cmdRes, $req); + $req->setAction('delete'); + $req->setUrl($url); $res = $req->send(); Log::info('Post deleted from server');