Update Embedfiles.php

a little more cleanup
This commit is contained in:
Ray 2023-03-11 20:42:11 -05:00
parent 6519dc509a
commit 213a4cded5

View file

@ -25,16 +25,8 @@ class Embedfiles extends Controller
if (argc() > 1 && argv(1) === 'sharelink') {
// API: /embedfiles/sharelink
// Takes raw data from the request
$json = file_get_contents('php://input');
// Converts it into a PHP object
$data = json_decode($json);
$resource_id = $_POST["hash"];
// var_dump($_POST);
// exit;
// $x = self::sharelink($resource_id, $channel_id);
$x = self::sharelink($resource_id, $channel_id);
if ($x) {
json_return_and_die(['status' => true, 'sharelink' => $x, 'resource_id' => $resource_id]);
@ -147,7 +139,6 @@ class Embedfiles extends Controller
}
*/
// protected static function sharelink($resource, $channel_id = 0)
protected static function sharelink($resource, $channel_id = 0)
{
if (intval($channel_id)) {