<?php

use Illuminate\Support\Facades\Route;
use Modules\Video\Http\Controllers\EpisodeController;
use Modules\Video\Http\Controllers\VideoCategoryController;
use Modules\Video\Http\Controllers\VideoController;
use Modules\Video\Http\Controllers\VideoSeriesWechatCheckController;
use Modules\Video\Http\Controllers\WechatCheckController;

Route::prefix('videoStock')->group(function () {
    Route::get('video/list', [VideoController::class, 'list']);
    Route::get('episode/list', [EpisodeController::class, 'list']);
    Route::get('episode/downloadList', [EpisodeController::class, 'downloadList']);
    Route::get('videoCategory/list', [VideoCategoryController::class, 'list']);


    Route::post('video/update', [VideoController::class, 'update']);
    Route::post('video/add', [VideoController::class, 'add']);
    Route::post('video/setChargeConfig', [VideoController::class, 'setChargeConfig']);
    Route::post('episode/add', [EpisodeController::class, 'add']);

    Route::prefix('wechatCheck')->group(function(){
        Route::post('add', [WechatCheckController::class, 'add']);
        Route::post('check', [WechatCheckController::class, 'check']);
        Route::get('list', [WechatCheckController::class, 'list']);
        Route::post('delete', [WechatCheckController::class, 'delete']);
        Route::post('update', [WechatCheckController::class, 'update']);
        Route::prefix('videoSeries')->group(function(){
            Route::post('syncWechat', [VideoSeriesWechatCheckController::class, 'syncWechat']);
            Route::post('medialink', [VideoSeriesWechatCheckController::class, 'medialink']);
            Route::post('listEvidence', [VideoSeriesWechatCheckController::class, 'listEvidence']);
            Route::get('test', [VideoSeriesWechatCheckController::class, 'test'])->withoutMiddleware(config('catch.route.middlewares'));
        });
    });

});

