generated from liutk/owl-admin-base
30 lines
1.0 KiB
PHP
30 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Middleware\HasBindPhone;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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!
|
|
|
|
|
*/
|
|
Route::group(['prefix' => 'miniprogram', 'namespace' => 'Api\Miniprogram'], function () {
|
|
// code2session
|
|
Route::post('code-to-session', [App\Http\Controllers\Api\AuthController::class, 'codeToSession']);
|
|
|
|
Route::middleware('auth:sanctum')->group(function(){
|
|
// 令牌刷新
|
|
Route::post('refresh-token', [App\Http\Controllers\Api\AuthController::class, 'refreshToken']);
|
|
// 已授权绑定手机号
|
|
Route::middleware([HasBindPhone::class])->group(function(){
|
|
|
|
});
|
|
});
|
|
});
|