fipamo/routes/api.php
ro eda377aba3
publish site from settings active
with the setting page set up, now the the settings api can be added,
beginning with the ability to render all files from settings.

the base settings api class is set up, so now the rest of the methods
can be added
2024-03-19 15:34:01 -06:00

29 lines
1 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']);