This commit is contained in:
root 2019-12-16 13:59:15 +08:00
parent 87da5846a9
commit 01ac86156d
2 changed files with 16 additions and 0 deletions

View File

@ -35,6 +35,21 @@ class UserController extends Controller
]);
}
public function id2UserInfo ($id) {
if (empty($id)) {
abort(500, '参数错误');
}
return response([
'data' => User::select([
'email',
'u',
'd',
'transfer_enable',
'expired_at'
])->find($id)
]);
}
public function update (UserUpdate $request) {
$updateData = $request->only([
'email',

View File

@ -42,6 +42,7 @@ Route::prefix('v1')
// User
Route::get ('user', 'Admin\\UserController@index');
Route::post('user/update', 'Admin\\UserController@update');
Route::get ('user/id2UserInfo/{id}', 'Admin\\UserController@id2UserInfo');
// Stat
Route::get ('stat/dashboard', 'Admin\\StatController@dashboard');
// Notice