Some type safety checks and rearrange file upload and mime type check code

This commit is contained in:
Alex Cabal 2024-01-11 13:08:02 -06:00
parent 362fb52d7d
commit a2de3c3ecb
3 changed files with 16 additions and 7 deletions

View file

@ -1,4 +1,6 @@
<?
use function Safe\parse_url;
class Museum extends PropertiesBase{
public int $MuseumId;
public string $Name;
@ -16,6 +18,10 @@ class Museum extends PropertiesBase{
throw new Exceptions\InvalidUrlException($url);
}
if(!isset($parsedUrl['host'])){
throw new Exceptions\InvalidUrlException($url);
}
$result = Db::Query('
SELECT *
from Museums