mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update
This commit is contained in:
parent
87da5846a9
commit
01ac86156d
@ -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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user