1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00

allow access key to access private demos

This commit is contained in:
Robin Appelman 2025-05-03 15:45:22 +02:00
commit 52b9bc09fd
10 changed files with 37 additions and 52 deletions

View file

@ -28,7 +28,8 @@ class DemoController extends BaseController {
ChatProvider $chatProvider,
DemoListProvider $demoListProvider,
DemoStore $store,
string $editKey
string $editKey,
string $accessKey,
) {
parent::__construct($request, $response);
$this->demoProvider = $demoProvider;
@ -36,6 +37,11 @@ class DemoController extends BaseController {
$this->demoListProvider = $demoListProvider;
$this->store = $store;
$this->editKey = $editKey;
if ($this->getAccessKey() === $accessKey) {
$this->demoProvider->showPrivateData(true);
$this->demoListProvider->showPrivateData(true);
}
}
public function get(string $id): void {