Updated to v1.2.7

This commit is contained in:
Henry Whitaker
2020-04-24 18:29:30 +01:00
parent 229bb30cf5
commit 1090335cdd
8 changed files with 146 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use Exception;
use Updater;
use Illuminate\Http\Request;
@@ -58,4 +59,20 @@ class UpdateController extends Controller
'success' => $cp,
], 200);
}
public function changelog()
{
$url = base_path() . '/changelog.json';
try {
$changelog = json_decode(file_get_contents($url), true);
} catch(Exception $e) {
$changelog = [];
}
return response()->json([
'method' => 'get changelog',
'data' => $changelog
], 200);
}
}