blessing-skin-server/routes/api.php

21 lines
801 B
PHP
Raw Normal View History

2019-04-23 10:05:58 +08:00
<?php
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 13:31:45 +08:00
Route::prefix('user')->middleware('auth:jwt')->group(function () {
Route::put('sign', 'UserController@sign');
2019-04-23 10:05:58 +08:00
});
2019-04-25 13:31:45 +08:00
Route::prefix('players')->middleware('auth:jwt')->group(function () {
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');
});