Skip to content

Commit

Permalink
fix agif warnigns
Browse files Browse the repository at this point in the history
  • Loading branch information
tomahock committed May 29, 2024
1 parent 0aba1de commit bf3b144
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/WarningsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function addAgif(Request $request)
$warning->text = $status;
$warning->save();

NotificationTool::sendWarningNotification($status);
NotificationTool::sendAllNotification($status);

TwitterTool::tweet($status);
TelegramTool::publish($status);
Expand Down
3 changes: 2 additions & 1 deletion app/Tools/NotificationTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public static function sendWarning($status, $topic)
],
];

Log::debug(json_encode($headers));

$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://fcm.googleapis.com/fcm/send', $headers);
Expand Down Expand Up @@ -301,7 +302,7 @@ public static function sendWarningNotification($status)
self::sendWarning($status, $topic);
}

public static function senAllNotification($status)
public static function sendAllNotification($status)
{
$topic = "all";

Expand Down

0 comments on commit bf3b144

Please sign in to comment.