refactor: 重构规范部分代码、邮件队列增加失败重试、去除多个支付方式、更新依赖

This commit is contained in:
xboard
2024-04-10 00:51:03 +08:00
parent ec63e05575
commit 4c6c7182e2
50 changed files with 421 additions and 1005 deletions
@@ -17,17 +17,6 @@ use Illuminate\Support\Facades\Cache;
*/
class ShadowsocksTidalabController extends Controller
{
public function __construct(Request $request)
{
$token = $request->input('token');
if (empty($token)) {
throw new ApiException('token is null');
}
if ($token !== admin_setting('server_token')) {
throw new ApiException('token is error');
}
}
// 后端获取用户
public function user(Request $request)
{
@@ -38,8 +27,7 @@ class ShadowsocksTidalabController extends Controller
return $this->fail([400,'节点不存在']);
}
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_LAST_CHECK_AT', $server->id), time(), 3600);
$serverService = new ServerService();
$users = $serverService->getAvailableUsers($server->group_id);
$users = ServerService::getAvailableUsers($server->group_id);
$result = [];
foreach ($users as $user) {
array_push($result, [