mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
baf719fcff
@ -45,12 +45,11 @@ class PoseidonController extends Controller
|
||||
$user->v2ray_user = [
|
||||
"uuid" => $user->uuid,
|
||||
"email" => sprintf("%s@v2board.user", $user->uuid),
|
||||
"alter_id" => $user->v2ray_alter_id,
|
||||
"level" => $user->v2ray_level,
|
||||
"alter_id" => $server->alter_id,
|
||||
"level" => 0,
|
||||
];
|
||||
unset($user['uuid']);
|
||||
unset($user['v2ray_alter_id']);
|
||||
unset($user['v2ray_level']);
|
||||
unset($user['email']);
|
||||
array_push($result, $user);
|
||||
}
|
||||
|
||||
@ -136,9 +135,23 @@ class PoseidonController extends Controller
|
||||
}
|
||||
|
||||
protected function success($data) {
|
||||
$req = request();
|
||||
// Only for "GET" method
|
||||
if (!$req->isMethod('GET') || !$data) {
|
||||
return response([
|
||||
'msg' => 'ok',
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
$etag = sha1(json_encode($data));
|
||||
if ($etag == $req->header("IF-NONE-MATCH")) {
|
||||
return response(null, 304);
|
||||
}
|
||||
|
||||
return response([
|
||||
'msg' => 'ok',
|
||||
'data' => $data,
|
||||
])->header('ETAG', $etag);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class OrderAssign extends FormRequest
|
||||
'plan_id' => 'required',
|
||||
'email' => 'required',
|
||||
'total_amount' => 'required',
|
||||
'cycle' => 'required|in:month_price,quarter_price,half_year_price,year_price,onetime_price,reset_price'
|
||||
'cycle' => 'required|in:month_price,quarter_price,half_year_price,year_price,two_year_price,three_year_price,onetime_price,reset_price'
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user