fix: 🔒 app should not require admin access (closes #76)
This commit is contained in:
parent
522c929a82
commit
bebd6bf5ed
@ -27,6 +27,10 @@ class EpisodesController extends Controller
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function list(string $url): JSONResponse {
|
||||
$client = $this->clientService->newClient();
|
||||
$feed = $client->get($url);
|
||||
@ -37,6 +41,10 @@ class EpisodesController extends Controller
|
||||
return new JSONResponse($episodes, $feed->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function action(string $url): JSONResponse {
|
||||
$action = $this->episodeActionRepository->findByEpisodeUrl($url, $this->userService->getUserUID());
|
||||
|
||||
|
@ -22,6 +22,10 @@ class PodcastController extends Controller
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function index(string $url): JSONResponse {
|
||||
try {
|
||||
$podcast = $this->podcastDataReader->tryGetCachedPodcastData($url);
|
||||
|
@ -19,6 +19,10 @@ class SearchController extends Controller
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function index(string $q): JSONResponse {
|
||||
return new JSONResponse($this->multiPodService->search($q));
|
||||
}
|
||||
|
@ -19,10 +19,18 @@ class ToplistController extends Controller
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function hot(): JSONResponse {
|
||||
return new JSONResponse($this->fyydService->hot());
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function new(): JSONResponse {
|
||||
return new JSONResponse($this->fyydService->latest());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user