mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: more feature
This commit is contained in:
parent
b4d74a016a
commit
f8185b51b7
@ -17,6 +17,16 @@ use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
public function resetSecret(Request $request)
|
||||
{
|
||||
$user = User::find($request->input('id'));
|
||||
if (!$user) abort(500, '用户不存在');
|
||||
$user->token = Helper::guid();
|
||||
$user->uuid = Helper::guid(true);
|
||||
return response([
|
||||
'data' => $user->save()
|
||||
]);
|
||||
}
|
||||
|
||||
private function filter(Request $request, $builder)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class UserFetch extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'filter.*.key' => 'required|in:id,email,transfer_enable,d,expired_at,uuid,token,invite_by_email,invite_user_id,plan_id',
|
||||
'filter.*.key' => 'required|in:id,email,transfer_enable,d,expired_at,uuid,token,invite_by_email,invite_user_id,plan_id,banned',
|
||||
'filter.*.condition' => 'required|in:>,<,=,>=,<=,模糊',
|
||||
'filter.*.value' => 'required'
|
||||
];
|
||||
|
@ -73,6 +73,7 @@ class AdminRoute
|
||||
$router->post('/user/dumpCSV', 'Admin\\UserController@dumpCSV');
|
||||
$router->post('/user/sendMail', 'Admin\\UserController@sendMail');
|
||||
$router->post('/user/ban', 'Admin\\UserController@ban');
|
||||
$router->post('/user/resetSecret', 'Admin\\UserController@resetSecret');
|
||||
// StatOrder
|
||||
$router->get ('/stat/getOverride', 'Admin\\StatController@getOverride');
|
||||
$router->get ('/stat/getServerLastRank', 'Admin\\StatController@getServerLastRank');
|
||||
|
@ -236,5 +236,5 @@ return [
|
||||
| The only modification by laravel config
|
||||
|
|
||||
*/
|
||||
'version' => '1.4.3.1609147421'
|
||||
'version' => '1.4.3.1609594523'
|
||||
];
|
||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user