mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: set default url to app url
This commit is contained in:
		| @@ -54,12 +54,12 @@ class ConfigController extends Controller | ||||
|  | ||||
|     public function setTelegramWebhook(Request $request) | ||||
|     { | ||||
|         $appUrl = config('v2board.app_url'); | ||||
|         if (!$appUrl) abort(500, '请先配置正确的站点地址'); | ||||
|         $telegramService = new TelegramService($request->input('telegram_bot_token')); | ||||
|         $telegramService->getMe(); | ||||
|         $telegramService->setWebhook( | ||||
|             url( | ||||
|                 '/api/v1/guest/telegram/webhook?access_token=' . md5(config('v2board.telegram_bot_token', $request->input('telegram_bot_token'))) | ||||
|             ) | ||||
|             $appUrl . '/api/v1/guest/telegram/webhook?access_token=' . md5(config('v2board.telegram_bot_token', $request->input('telegram_bot_token'))) | ||||
|         ); | ||||
|         return response([ | ||||
|             'data' => true | ||||
|   | ||||
| @@ -26,7 +26,7 @@ class PaymentController extends Controller | ||||
|     { | ||||
|         $payments = Payment::all(); | ||||
|         foreach ($payments as $k => $v) { | ||||
|             $notifyUrl = url("/api/v1/guest/payment/notify/{$v->payment}/{$v->uuid}"); | ||||
|             $notifyUrl = config('v2board.app_url') . "/api/v1/guest/payment/notify/{$v->payment}/{$v->uuid}"; | ||||
|             if ($v->notify_domain) { | ||||
|                 $parseUrl = parse_url($notifyUrl); | ||||
|                 $notifyUrl = $v->notify_domain . $parseUrl['path']; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user