git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 0.7.1
[shpub.git]
/
src
/
shpub
/
Command
/
Delete.php
diff --git
a/src/shpub/Command/Delete.php
b/src/shpub/Command/Delete.php
index a13775aa603881141f838384f8e9042b224af05d..cd975000e65585694bb1537c876b1c5fdbced94c 100644
(file)
--- a/
src/shpub/Command/Delete.php
+++ b/
src/shpub/Command/Delete.php
@@
-6,6
+6,8
@@
class Command_Delete extends Command_AbstractProps
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('delete');
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('delete');
+ $cmd->description = 'Delete an existing post';
+ static::addOptJson($cmd);
$cmd->addArgument(
'url',
[
$cmd->addArgument(
'url',
[
@@
-23,8
+25,9
@@
class Command_Delete extends Command_AbstractProps
}
$req = new Request($this->cfg->host, $this->cfg);
}
$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');
$res = $req->send();
Log::info('Post deleted from server');