mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 12:07:28 +08:00
feat: new xboard
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user