51 lines
1.8 KiB
PHP
Executable File
51 lines
1.8 KiB
PHP
Executable File
<?php
|
|
|
|
use App\Http\Controllers\ProfileController;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\TwitchController;
|
|
use App\Http\Controllers\GameSessionController;
|
|
use App\Http\Controllers\PaletteController;
|
|
|
|
Route::get('/palette-editor', [PaletteController::class, 'index']);
|
|
Route::post('/palette-editor', [PaletteController::class, 'store']);
|
|
Route::post('/palette-editor/{palette}/colors', [PaletteController::class, 'addColor']);
|
|
Route::put('/palette-editor/{palette}/colors/{color}', [PaletteController::class, 'updateColor']);
|
|
Route::delete('/palette-editor/{palette}/colors/{color}', [PaletteController::class, 'deleteColor']);
|
|
Route::get('/palette-editor/{palette}/colors', [PaletteController::class, 'getColors']);
|
|
|
|
|
|
|
|
Route::post('/twitch/parse', [TwitchController::class, 'parseChatMessage']);
|
|
|
|
Route::post('/game-session/start', [GameSessionController::class, 'start']);
|
|
Route::post('/game-session/end', [GameSessionController::class, 'end']);
|
|
Route::get('/game-session/current', [GameSessionController::class, 'current']);
|
|
|
|
Route::get('/api/current-state', [TwitchController::class, 'getCurrentState']);
|
|
|
|
|
|
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
});
|
|
|
|
Route::get('/prototype', function () {
|
|
return view('prototype');
|
|
});
|
|
|
|
Route::get('/dashboard', function () {
|
|
return view('dashboard');
|
|
});
|
|
|
|
Route::get('/testing', function () {
|
|
return view('testing');
|
|
})->middleware(['auth', 'verified'])->name('testing');
|
|
|
|
Route::middleware('auth')->group(function () {
|
|
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
|
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
|
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
|
});
|
|
|
|
require __DIR__.'/auth.php';
|