Commit 94895df7 by lujunyi

部分接口排除角色检查中间件

parent 6f84319f
......@@ -29,15 +29,15 @@
// 需要验证是否登录的路由组
Route::middleware(['jwt.auth', 'checkrole'])->group(function () {
// 获取用户信息
Route::get('/users', 'App\Api\Controllers\UserController@userInfo');
Route::get('/users', 'App\Api\Controllers\UserController@userInfo')->withoutMiddleware(['checkrole']);
// 退出
Route::post('logout', 'App\Api\Controllers\UserController@logout');
Route::post('logout', 'App\Api\Controllers\UserController@logout')->withoutMiddleware(['checkrole']);
// 刷新token
Route::post('refresh', 'App\Api\Controllers\UserController@refresh');
Route::post('refresh', 'App\Api\Controllers\UserController@refresh')->withoutMiddleware(['checkrole']);
# 获取发送验证码
Route::post('/smscode', 'App\Api\Controllers\UserController@smsCode');
Route::post('/smscode', 'App\Api\Controllers\UserController@smsCode')->withoutMiddleware(['checkrole']);
# 角色绑定
Route::post('/role-bind', 'App\Api\Controllers\UserController@bindRole');
Route::post('/role-bind', 'App\Api\Controllers\UserController@bindRole')->withoutMiddleware(['checkrole']);
# 获取药品列表
Route::get('/drugs', 'App\Api\Controllers\DrugController@drugList');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment