You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.8 KiB
PHP
47 lines
1.8 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\api\AuthController;
|
|
use App\Http\Controllers\api\superadmin\ApkUploadController;
|
|
use App\Http\Controllers\api\superadmin\VideoUploadController;
|
|
use App\Http\Middleware\Cors;
|
|
use App\Http\Middleware\UserAuthMiddleware;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
| be assigned to the "api" middleware group. Make something great!
|
|
|
|
|
*/
|
|
const USER_MIDDLEWARES = ['auth:sanctum', UserAuthMiddleware::class];
|
|
Route::controller(AuthController::class )->group(function() {
|
|
Route::post('/login', 'login');
|
|
Route::middleware(USER_MIDDLEWARES)->group(function() {
|
|
Route::post('/auth/check', 'check');
|
|
Route::post('/auth/change-password', 'changePassword');
|
|
Route::post('/auth/logout', 'logout');
|
|
});
|
|
});
|
|
|
|
Route::middleware(USER_MIDDLEWARES)->prefix('superadmin')->group(function() {
|
|
Route::controller(VideoUploadController::class)->group(function() {
|
|
Route::post('/video-upload', 'init');
|
|
Route::post('/video-upload/save', 'save');
|
|
Route::post('/video-upload/update', 'update');
|
|
Route::post('/video-upload/delete', 'delete');
|
|
Route::post('/video-upload/change-selected-video', 'changeSelectedVideo');
|
|
});
|
|
|
|
Route::controller(ApkUploadController::class)->group(function() {
|
|
Route::post('/apk-upload', 'init');
|
|
Route::post('/apk-upload/save', 'save');
|
|
Route::post('/apk-upload/update', 'update');
|
|
Route::post('/apk-upload/delete', 'delete');
|
|
});
|
|
});
|
|
// tmux session, tmux attach session -t
|