2024-02-29 18:09:17 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2024-03-07 19:04:52 +01:00
|
|
|
use App\Http\Controllers\API\AuthAPIController;
|
2024-03-07 22:42:11 +01:00
|
|
|
use App\Http\Controllers\API\PageAPIController;
|
2024-03-11 23:32:38 +01:00
|
|
|
use App\Http\Controllers\API\FileUploadAPIController;
|
2024-03-19 22:34:01 +01:00
|
|
|
use App\Http\Controllers\API\SettingsAPIController;
|
2024-04-16 23:36:57 +02:00
|
|
|
use App\Http\Controllers\API\InitAPIController;
|
2024-06-05 21:33:11 +02:00
|
|
|
use App\Http\Controllers\API\MailAPIController;
|
2024-02-29 18:09:17 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-03-07 22:42:11 +01:00
|
|
|
//check if session is active
|
2024-03-07 19:04:52 +01:00
|
|
|
Route::get("/v1/status", [AuthAPIController::class, 'status']);
|
2024-03-12 23:16:36 +01:00
|
|
|
//handle page editing actions
|
2024-03-07 22:42:11 +01:00
|
|
|
Route::put("/v1/page/write", [PageAPIController::class, 'write']);
|
2024-03-12 23:16:36 +01:00
|
|
|
Route::post("/v1/page/create", [PageAPIController::class, 'create']);
|
|
|
|
//handle file uploads
|
2024-03-11 23:32:38 +01:00
|
|
|
Route::post("/v1/files", [FileUploadAPIController::class, 'upload']);
|
2024-03-19 22:34:01 +01:00
|
|
|
//settings
|
|
|
|
Route::put("/v1/settings/publish", [SettingsAPIController::class, 'publish']);
|
2024-03-19 23:35:02 +01:00
|
|
|
Route::put("/v1/settings/sync", [SettingsAPIController::class, 'sync']);
|
2024-03-22 21:35:44 +01:00
|
|
|
Route::put("/v1/settings/nav-sync", [SettingsAPIController::class, 'navSync']);
|
2024-04-05 20:29:38 +02:00
|
|
|
Route::put("/v1/backup/create", [SettingsAPIController::class, 'createBackup']);
|
|
|
|
Route::get("/v1/backup/download", [SettingsAPIController::class, 'downloadBackup']);
|
2024-04-16 23:36:57 +02:00
|
|
|
//init
|
|
|
|
Route::post("/v1/init", [InitAPIController::class, 'setupFresh']);
|
2024-04-18 22:36:05 +02:00
|
|
|
Route::post("/v1/restore", [InitAPIController::class, 'setupRestore']);
|
2024-07-03 01:09:27 +02:00
|
|
|
Route::post("/v1/reset", [InitAPIController::class, 'setupReset']);
|
|
|
|
|
2024-06-05 21:33:11 +02:00
|
|
|
//mail
|
|
|
|
Route::post("/v1/mailer", [MailAPIController::class, 'sendNotify']);
|