Commit f1f564ce authored by Emiliano Balbuena's avatar Emiliano Balbuena

(fix): Only owners can list/read their campaigns

1 merge request!235WIP: Boost Campaigns (&24)
Pipeline #72763181 passed with stages
in 9 minutes and 1 second
......@@ -57,7 +57,9 @@ class campaigns implements Interfaces\Api
'limit' => $limit,
'offset' => $offset,
'guid' => $guid,
]);
])->filter(function (Campaign $campaign) {
return $campaign->getOwnerGuid() == Session::getLoggedinUserGuid();
});
return Factory::response([
'campaigns' => $response,
......
......@@ -72,6 +72,7 @@ class campaigns implements Interfaces\Api
$cacher = Core\Data\cache\factory::build('Redis');
$cacheKey = "{$userGuid}:boost-offset-rotator:{$type}:{$quality}:{$rating}";
// TODO: ENABLE ME AGAIN!
// $offset = $cacher->get($cacheKey);
$offset = null;
......
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