PixelPlacerBot/routes/web.php

51 lines
1.8 KiB
PHP
Raw Normal View History

2024-07-19 19:51:38 -04:00
<?php
use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
2024-07-20 13:02:52 -04:00
use App\Http\Controllers\TwitchController;
2024-07-27 15:40:35 -04:00
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']);
2024-07-20 13:02:52 -04:00
Route::post('/twitch/parse', [TwitchController::class, 'parseChatMessage']);
2024-07-19 19:51:38 -04:00
2024-07-27 15:40:35 -04:00
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']);
2024-07-19 19:51:38 -04:00
Route::get('/', function () {
return view('welcome');
});
2024-07-20 13:02:52 -04:00
Route::get('/prototype', function () {
return view('prototype');
});
2024-07-19 19:51:38 -04:00
Route::get('/dashboard', function () {
return view('dashboard');
2024-07-27 15:40:35 -04:00
});
2024-07-19 19:51:38 -04:00
2024-07-20 13:02:52 -04:00
Route::get('/testing', function () {
return view('testing');
})->middleware(['auth', 'verified'])->name('testing');
2024-07-19 19:51:38 -04:00
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';