2019-04-23 10:05:58 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
Route::prefix('auth')->group(function ($route) {
|
2019-04-25 13:29:43 +08:00
|
|
|
$route->post('login', 'AuthController@jwtLogin');
|
|
|
|
$route->post('logout', 'AuthController@jwtLogout')->middleware('auth:jwt');
|
|
|
|
$route->post('refresh', 'AuthController@jwtRefresh')->middleware('auth:jwt');
|
2019-04-23 10:05:58 +08:00
|
|
|
});
|
|
|
|
|
2019-04-25 13:29:43 +08:00
|
|
|
Route::prefix('user')->middleware('auth:jwt')->group(function ($route) {
|
2019-04-23 22:32:35 +08:00
|
|
|
$route->put('sign', 'UserController@sign');
|
2019-04-23 23:03:12 +08:00
|
|
|
|
2019-04-24 13:10:03 +08:00
|
|
|
$route->get('players', 'PlayerController@listAll');
|
|
|
|
$route->post('players', 'PlayerController@add');
|
|
|
|
$route->delete('players/{pid}', 'PlayerController@delete');
|
|
|
|
$route->put('players/{pid}/name', 'PlayerController@rename');
|
|
|
|
$route->put('players/{pid}/textures', 'PlayerController@setTexture');
|
|
|
|
$route->delete('players/{pid}/textures', 'PlayerController@clearTexture');
|
2019-04-23 10:05:58 +08:00
|
|
|
});
|
|
|
|
|