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:
parent
1593435254
commit
52b9bc09fd
10 changed files with 37 additions and 52 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue