mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-09-09 03:35:14 -05:00
Removed .idea folder
This commit is contained in:
41
dist/app/Http/Controllers/Api/PatchController.php
vendored
Normal file
41
dist/app/Http/Controllers/Api/PatchController.php
vendored
Normal 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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user