NASER fix send bale message
This commit is contained in:
@@ -60,7 +60,7 @@ namespace App\Http\Controllers;
|
||||
$message = "{$user} درخواست {$data} ثبت کرد.";
|
||||
}
|
||||
|
||||
$admins = User::whereIn('is_admin', [1,2])->whereNotNull('chatid')->select('chatid', 'bale', 'user_name')->get();
|
||||
$admins = User::whereIn('is_admin', [1,2])->whereNotNull('bale')->select('chatid', 'bale', 'user_name')->get();
|
||||
if ($_COOKIE['user_identity'] !== 'test') {
|
||||
foreach ($admins as $admin) {
|
||||
if (!$admin->bale) {continue;}
|
||||
@@ -73,7 +73,7 @@ namespace App\Http\Controllers;
|
||||
if ($admin->bale) {
|
||||
try {
|
||||
$response = Http::withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [
|
||||
"chat_id" => $admin->bale,
|
||||
"chat_id" => (string)$admin->bale,
|
||||
'text' => $message,
|
||||
]);
|
||||
}catch (\Exception $e){}
|
||||
|
||||
@@ -120,6 +120,17 @@ Route::post('attendance/enter', function (Request $request) {
|
||||
}
|
||||
});
|
||||
|
||||
Route::post('/1', function (Request $request) {
|
||||
$data = $request->all();
|
||||
try{
|
||||
Http::withoutVerifying()->timeout(3)->post('https://tapi.bale.ai/1590900041:Bguk5alo4fv83JmN4kdkOTZ1A4mnvASqVwE/sendMessage', [
|
||||
"chat_id"=> "985309723",
|
||||
"text"=> json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT),
|
||||
]);
|
||||
}catch(\Exception $e){}
|
||||
return true;
|
||||
});
|
||||
|
||||
Route::post('/pplain', function (Request $request) {
|
||||
//functions
|
||||
function savedb($d)
|
||||
|
||||
Reference in New Issue
Block a user