fixed some stuff
This commit is contained in:
@@ -32,7 +32,7 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){
|
||||
$fileExtThumb = explode('.', $thumbnailFileName);
|
||||
$fileActualExtThumb = strtolower(end($fileExtThumb));
|
||||
|
||||
$allowedFileTypeThumbnail = array('gif', 'jpeg', 'png', 'svg');
|
||||
$allowedFileTypeThumbnail = array('gif', 'jpeg', 'png', 'svg', 'jpg', 'jfif', 'pjpeg', 'pjp', 'webp');
|
||||
|
||||
if(in_array($fileActualExtThumb,$allowedFileTypeThumbnail)){
|
||||
$thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require_once "../../../bootstrap.php";
|
||||
use \Backend\Models\GameData;
|
||||
use \Backend\Models\Group;
|
||||
use \Backend\Models\GameJam;
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['gameDataId'])){
|
||||
$openGameDataStream = GameData::find($_GET['gameDataId']);
|
||||
}elseif(isset($_GET['groupId'])){
|
||||
$openGameDataStream = Group::find($_GET['groupId'])->GameData();
|
||||
}elseif (isset($_GET['gameJamId'])){
|
||||
$openGameDataStream = Group::where("game_jam_id",$_GET['gameJamId'])->GameData();/*->pluck("id")->toArray()*/;
|
||||
}else{
|
||||
$openGameDataStream = GameData::all();
|
||||
}
|
||||
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $openGameDataStream ->toJson(JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user