fix: 🔒 app should not require admin access (closes #76)
All checks were successful
repod / xml (push) Successful in 13s
repod / php (push) Successful in 34s
repod / nodejs (push) Successful in 1m55s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-03-16 17:42:28 +01:00
parent 522c929a82
commit bebd6bf5ed
4 changed files with 24 additions and 0 deletions

View File

@ -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());

View File

@ -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);

View File

@ -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));
}

View File

@ -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());
}