Removed .idea folder

This commit is contained in:
Vari 2024-02-21 00:18:01 +01:00
parent eeb29a6f46
commit 36b9371a5b
6 changed files with 52 additions and 10 deletions

View File

@ -0,0 +1,41 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class PatchController extends Controller
{
public function getCurrentPatch()
{
$disk = Storage::disk('patches');
$patchFiles = $disk->allFiles('paks');
if (count($patchFiles) <= 0)
return response('No Patches Found', 404);
$filePath = $disk->path($patchFiles[0]);
return response()->download($filePath);
}
public function getSignature()
{
$disk = Storage::disk('patches');
if(!$disk->exists('TheExit.sig'))
return response('No Patches Found', 404);
return response()->download($disk->path('TheExit.sig'));
}
public function getBattleyePatch()
{
$disk = Storage::disk('patches');
if(!$disk->exists('bottleEye/BEClient_x64.dll'))
return response('No Patch Found', 404);
return response()->download($disk->path('bottleEye/BEClient_x64.dll'));
}
}

View File

@ -44,18 +44,11 @@
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'patches' => [
'driver' => 'local',
'root' => resource_path('patches'),
'throw' => false,
],
],
/*

BIN
dist/resources/patches/TheExit.sig vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

8
dist/routes/api.php vendored
View File

@ -11,6 +11,14 @@
|
*/
use App\Http\Controllers\Api\PatchController;
Route::prefix('files')->group(function () {
Route::get('patch/current', [PatchController::class, 'getCurrentPatch']);
Route::get('patch/sig', [PatchController::class, 'getSignature']);
Route::get('patch/battleye', [PatchController::class, 'getBattleyePatch']);
});
Route::fallback(function () {
return response('route not found', 404);
});