ro
f8005aa60d
ported over the backup functionality from the old build to the new while making few tweaks instead of packaging up all files in the site to create massive zip files, now a list of files is created for the user and blog directories that the system will use to download and put them in the appropriate directories, resulting in a such slimmer backup file. archiving images my be added at a later date, but will be kept seperate from the current back up process
33 lines
1.4 KiB
PHP
33 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\API\AuthAPIController;
|
|
use App\Http\Controllers\API\PageAPIController;
|
|
use App\Http\Controllers\API\FileUploadAPIController;
|
|
use App\Http\Controllers\API\SettingsAPIController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
| be assigned to the "api" middleware group. Make something great!
|
|
|
|
|
*/
|
|
|
|
//check if session is active
|
|
Route::get("/v1/status", [AuthAPIController::class, 'status']);
|
|
//handle page editing actions
|
|
Route::put("/v1/page/write", [PageAPIController::class, 'write']);
|
|
Route::post("/v1/page/create", [PageAPIController::class, 'create']);
|
|
//handle file uploads
|
|
Route::post("/v1/files", [FileUploadAPIController::class, 'upload']);
|
|
//settings
|
|
Route::put("/v1/settings/publish", [SettingsAPIController::class, 'publish']);
|
|
Route::put("/v1/settings/sync", [SettingsAPIController::class, 'sync']);
|
|
Route::put("/v1/settings/nav-sync", [SettingsAPIController::class, 'navSync']);
|
|
Route::put("/v1/backup/create", [SettingsAPIController::class, 'createBackup']);
|
|
Route::get("/v1/backup/download", [SettingsAPIController::class, 'downloadBackup']);
|