forked from projects/fipamo
ro
ac543f3856
page editor was missing soft delete of page as it had not been wired up to the new api yet. oops
45 lines
1.9 KiB
PHP
45 lines
1.9 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;
|
|
use App\Http\Controllers\API\InitAPIController;
|
|
use App\Http\Controllers\API\MailAPIController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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']);
|
|
Route::delete("/v1/page/delete", [PageAPIController::class, 'delete']);
|
|
|
|
//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/content-download", [SettingsAPIController::class, 'downloadBackup']);
|
|
Route::get("/v1/backup/files-download", [SettingsAPIController::class, 'downloadBackup']);
|
|
//init
|
|
Route::post("/v1/init", [InitAPIController::class, 'setupFresh']);
|
|
Route::post("/v1/restore", [InitAPIController::class, 'setupRestore']);
|
|
Route::post("/v1/reset", [InitAPIController::class, 'setupReset']);
|
|
|
|
//mail
|
|
Route::post("/v1/mailer", [MailAPIController::class, 'sendNotify']);
|