feat(platform): add endpoint to retrieve platform accounts for a user
- Introduced `getPlatformAccountsByUserId` method in `DyVideoUser` model to fetch active platform accounts for a specified user. - Added new API route for accessing platform accounts under `v1/platform/accounts`, requiring user authentication.
This commit is contained in:
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
use think\facade\Route;
|
||||
use app\api\controller\v1\Auth;
|
||||
use app\api\controller\v1\Platform;
|
||||
|
||||
/**
|
||||
* API 应用路由
|
||||
@@ -19,3 +20,8 @@ Route::group('v1/auth', function () {
|
||||
Route::post('logout', [Auth::class, 'logout']);
|
||||
Route::post('password', [Auth::class, 'password']);
|
||||
})->middleware(\app\api\middleware\Auth::class);
|
||||
|
||||
// v1 平台账号管理接口(需登录)
|
||||
Route::group('v1/platform', function () {
|
||||
Route::get('accounts', [Platform::class, 'accounts']);
|
||||
})->middleware(\app\api\middleware\Auth::class);
|
||||
|
||||
Reference in New Issue
Block a user