mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update
This commit is contained in:
parent
82a762c8b8
commit
d792636d04
1 changed files with 3 additions and 3 deletions
|
@ -1198,11 +1198,11 @@ class API extends PluginAbstract
|
|||
if (!empty($_REQUEST['APISecret']) && !self::isAPISecretValid()) {
|
||||
return new ApiObject("Secret does not match");
|
||||
}
|
||||
$obj = new Video("", "", $parameters['videos_id']);
|
||||
if (!$obj->userCanManageVideo()) {
|
||||
$vid = new Video('', '', $parameters['videos_id'], true);
|
||||
if (!$vid->userCanManageVideo()) {
|
||||
return new ApiObject("User cannot manage the video");
|
||||
}
|
||||
$id = $obj->delete();
|
||||
$id = $vid->delete();
|
||||
return new ApiObject("", !$id, $id);
|
||||
} else {
|
||||
return new ApiObject("Video ID is required");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue