mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
proper error for setting url of unknown demo
This commit is contained in:
parent
97e51a19ef
commit
bebf6cfbd5
1 changed files with 4 additions and 0 deletions
|
|
@ -145,6 +145,10 @@ class DemoController extends BaseController {
|
|||
}
|
||||
|
||||
$demo = $this->demoProvider->get((int) $id);
|
||||
if (!$demo) {
|
||||
throw new NotFoundException("Demo not found");
|
||||
}
|
||||
|
||||
$existingHash = $demo->getHash();
|
||||
if ('' === $existingHash || $existingHash === $hash) {
|
||||
$this->demoProvider->setDemoUrl((int) $id, $backend, $url, $path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue