mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 13:23:04 +01:00
Updated changelog
This commit is contained in:
@@ -263,8 +263,12 @@ class SpeedtestHelper {
|
||||
if(env('DB_CONNECTION') === 'sqlite') {
|
||||
if(env('DB_DATABASE') !== null) {
|
||||
$current = env('DB_DATABASE');
|
||||
if(File::copy($current, $current . '.bak')) {
|
||||
return true;
|
||||
try {
|
||||
if(File::copy($current, $current . '.bak')) {
|
||||
return true;
|
||||
}
|
||||
}catch(Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,23 +287,18 @@ class SpeedtestHelper {
|
||||
{
|
||||
Cache::flush();
|
||||
|
||||
if(SpeedtestHelper::dbBackup() !== false) {
|
||||
if(sizeof(Speedtest::whereNotNull('id')->get()) > 0) {
|
||||
if(Speedtest::whereNotNull('id')->delete()) {
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
SpeedtestHelper::dbBackup();
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
if(sizeof(Speedtest::whereNotNull('id')->get()) > 0) {
|
||||
if(Speedtest::whereNotNull('id')->delete()) {
|
||||
return [
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => false,
|
||||
'msg' => 'There was an error backing up the database. No speedtests have been deleted.'
|
||||
'success' => true,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class IntegrationsController extends Controller
|
||||
SettingsHelper::testNotification();
|
||||
|
||||
return response()->json([
|
||||
'method' => 'test notificaiton agents'
|
||||
'method' => 'test notification agents'
|
||||
], 200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ class SpeedtestController extends Controller
|
||||
public function run()
|
||||
{
|
||||
try {
|
||||
SettingsHelper::loadIntegrationConfig();
|
||||
$data = SpeedtestJob::dispatch(false, config('integrations'));
|
||||
return response()->json([
|
||||
'method' => 'run speedtest',
|
||||
|
||||
Reference in New Issue
Block a user