feat: new xboard

This commit is contained in:
xboard
2025-01-21 14:57:54 +08:00
parent de18cfe596
commit 0f43fff242
373 changed files with 17923 additions and 20264 deletions
@@ -3,14 +3,23 @@
namespace App\Http\Controllers\V1\Guest;
use App\Http\Controllers\Controller;
use App\Http\Resources\PlanResource;
use App\Models\Plan;
use App\Services\PlanService;
use Auth;
use Illuminate\Http\Request;
class PlanController extends Controller
{
protected $planService;
public function __construct(PlanService $planService)
{
$this->planService = $planService;
}
public function fetch(Request $request)
{
$plan = Plan::where('show', 1)->get();
return $this->success($plan);
$plan = $this->planService->getAvailablePlans();
return $this->success(PlanResource::collection($plan));
}
}
@@ -23,7 +23,7 @@ class TelegramController extends Controller
if ($request->input('access_token') !== md5(admin_setting('telegram_bot_token'))) {
throw new ApiException('access_token is error', 401);
}
$data = json_decode(get_request_content(),true);
$data = json_decode(request()->getContent(),true);
$this->formatMessage($data);
$this->formatChatJoinRequest($data);
$this->handle();