feat(publish-plan): add publish plan query and API routes
- Introduced `buildPublishPlanQuery` method in `DyVideoCron` model to create a base query for the publish plan module, filtering records based on user ID and project status. - Added new API routes under `v1/publish-plan` for listing, starting, and stopping publish plans, requiring user authentication.
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
use think\facade\Route;
|
||||
use app\api\controller\v1\Auth;
|
||||
use app\api\controller\v1\Platform;
|
||||
use app\api\controller\v1\PublishPlan;
|
||||
|
||||
/**
|
||||
* API 应用路由
|
||||
@@ -25,3 +26,10 @@ Route::group('v1/auth', function () {
|
||||
Route::group('v1/platform', function () {
|
||||
Route::get('accounts', [Platform::class, 'accounts']);
|
||||
})->middleware(\app\api\middleware\Auth::class);
|
||||
|
||||
// v1 发布计划接口(需登录)
|
||||
Route::group('v1/publish-plan', function () {
|
||||
Route::get('list', [PublishPlan::class, 'index']);
|
||||
Route::post('start/:id', [PublishPlan::class, 'start']);
|
||||
Route::post('stop/:id', [PublishPlan::class, 'stop']);
|
||||
})->middleware(\app\api\middleware\Auth::class);
|
||||
|
||||
Reference in New Issue
Block a user