Commit 6b39b7d8 authored by Marcelo Rivera's avatar Marcelo Rivera

(feat): moved v2/feeds/channel to v2/pro/content

1 merge request!308WIP: (feat): Minds Pro
Pipeline #82529328 failed with stages
in 4 minutes and 16 seconds
......@@ -3,7 +3,7 @@
* @author: eiennohi.
*/
namespace Minds\Controllers\api\v2\feeds;
namespace Minds\Controllers\api\v2\pro;
use Minds\Api\Exportable;
use Minds\Api\Factory;
......@@ -14,7 +14,7 @@ use Minds\Entities\Factory as EntitiesFactory;
use Minds\Entities\User;
use Minds\Interfaces;
class channel implements Interfaces\Api
class content implements Interfaces\Api
{
const MIN_COUNT = 6;
......@@ -23,8 +23,6 @@ class channel implements Interfaces\Api
/** @var User $currentUser */
$currentUser = Core\Session::getLoggedinUser();
//
$container_guid = $pages[0] ?? null;
$owner_guid = null;
......@@ -68,8 +66,6 @@ class channel implements Interfaces\Api
break;
}
//
$hardLimit = 5000;
$offset = 0;
......@@ -96,17 +92,15 @@ class channel implements Interfaces\Api
]);
}
//
$sync = (bool) ($_GET['sync'] ?? false);
$fromTimestamp = $_GET['from_timestamp'] ?? 0;
$asActivities = (bool) ($_GET['as_activities'] ?? true);
$exclude = explode(',', $_GET['exclude'] ?? '');
$forcePublic = (bool) ($_GET['force_public'] ?? false);
$exclude = explode(',', $_GET['exclude'] ?? '');
$asActivities = (bool) ($_GET['as_activities'] ?? true);
$query = null;
......@@ -114,8 +108,6 @@ class channel implements Interfaces\Api
$query = $_GET['query'];
}
$custom_type = isset($_GET['custom_type']) && $_GET['custom_type'] ? [$_GET['custom_type']] : null;
/** @var Core\Feeds\Top\Entities $entities */
$entities = new Core\Feeds\Top\Entities();
$entities->setActor($currentUser);
......@@ -132,7 +124,7 @@ class channel implements Interfaces\Api
'container_guid' => $container_guid,
'owner_guid' => $owner_guid,
'access_id' => $isOwner && !$forcePublic ? [0, 1, 2, $container_guid] : [2, $container_guid],
'custom_type' => $custom_type,
'custom_type' => null,
'limit' => $limit,
'type' => $type,
'algorithm' => 'top',
......@@ -228,4 +220,5 @@ class channel implements Interfaces\Api
{
return Factory::response([]);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment