mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
delete static demo when changing demo url
This commit is contained in:
parent
df83a46e20
commit
611e7c3415
5 changed files with 138 additions and 21 deletions
|
|
@ -39,4 +39,10 @@ class DemoStore {
|
|||
private function getUrl(string $name): string {
|
||||
return 'https://' . $this->webRoot . $this->getPrefix($name) . $name;
|
||||
}
|
||||
|
||||
public function remove(Demo $demo) {
|
||||
if (file_exists($demo->getPath())) {
|
||||
unlink($demo->getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue