update: more feature

This commit is contained in:
tokumeikoi 2021-01-02 22:35:41 +09:00
parent b4d74a016a
commit f8185b51b7
5 changed files with 14 additions and 3 deletions

View File

@ -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)
{

View File

@ -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'
];

View File

@ -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');

View File

@ -236,5 +236,5 @@ return [
| The only modification by laravel config
|
*/
'version' => '1.4.3.1609147421'
'version' => '1.4.3.1609594523'
];

File diff suppressed because one or more lines are too long