<?php

use App\Http\Controllers\AuthController;
use App\Http\Controllers\HomeController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('/', [AuthController::class, 'getLogin']);
Route::post('/post-login', [AuthController::class, 'postLogin']);
Route::get('/logout', [AuthController::class, 'logout']);

Route::middleware(['auth'])->group(function () {
    Route::get('/index', [HomeController::class, 'index']);
    // 此处放置你的路由
    Route::get('/main', [HomeController::class, 'main']);
    Route::get('/gallery', [HomeController::class, 'gallery']);
    Route::get('/next-log', [HomeController::class, 'nextLog']);
    Route::get('/update-log', [HomeController::class, 'updateLog']);
    Route::get('/detail', [HomeController::class, 'detail']);
    Route::get('/download-all', [HomeController::class, 'downloadAll']);
    Route::get('/download-status', [HomeController::class, 'getDownloadAllStatus']);
    Route::get('/download-image', [HomeController::class, 'downloadImage']);
});


