mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 21:33:08 +01:00
Added optional authentication
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Helpers\SettingsHelper;
|
||||
use Exception;
|
||||
use Updater;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -9,6 +10,12 @@ use Illuminate\Http\JsonResponse;
|
||||
|
||||
class UpdateController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if((bool)SettingsHelper::get('auth')->value === true) {
|
||||
$this->middleware('auth:api');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for new update
|
||||
|
||||
Reference in New Issue
Block a user