2019-04-23 10:05:58 +08:00
|
|
|
<?php
|
|
|
|
|
2019-05-01 10:14:14 +08:00
|
|
|
Route::any('/', 'HomeController@apiRoot');
|
|
|
|
|
2019-04-25 13:31:45 +08:00
|
|
|
Route::prefix('auth')->group(function () {
|
|
|
|
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 23:24:24 +08:00
|
|
|
Route::prefix('user')->middleware('auth:jwt,oauth')->group(function () {
|
2019-04-27 23:10:21 +08:00
|
|
|
Route::get('', 'UserController@user');
|
2019-04-23 10:05:58 +08:00
|
|
|
});
|
|
|
|
|
2019-04-25 23:24:24 +08:00
|
|
|
Route::prefix('players')->middleware('auth:jwt,oauth')->group(function () {
|
2019-04-25 13:31:45 +08:00
|
|
|
Route::get('', 'PlayerController@listAll');
|
|
|
|
Route::post('', 'PlayerController@add');
|
|
|
|
Route::delete('{pid}', 'PlayerController@delete');
|
|
|
|
Route::put('{pid}/name', 'PlayerController@rename');
|
|
|
|
Route::put('{pid}/textures', 'PlayerController@setTexture');
|
|
|
|
Route::delete('{pid}/textures', 'PlayerController@clearTexture');
|
|
|
|
});
|
2019-04-28 11:38:38 +08:00
|
|
|
|
|
|
|
Route::prefix('closet')->middleware('auth:jwt,oauth')->group(function () {
|
|
|
|
Route::get('', 'ClosetController@getClosetData');
|
|
|
|
Route::post('', 'ClosetController@add');
|
|
|
|
Route::put('{tid}', 'ClosetController@rename');
|
|
|
|
Route::delete('{tid}', 'ClosetController@remove');
|
|
|
|
});
|