diff --git a/services/nginx/app/objects/departments_o.php b/services/nginx/app/objects/departments_o.php index 736bf818..65e063f5 100644 --- a/services/nginx/app/objects/departments_o.php +++ b/services/nginx/app/objects/departments_o.php @@ -786,6 +786,6 @@ class departments_o extends db } // Send the message to the internal Slack webhook $slack = new slack(); - $slack->send_message($tmp); + $slack->send_webhook_message($tmp, (new departments_o())->select(10)->slack_webhook->value()); } } \ No newline at end of file diff --git a/services/nginx/app/routes/exampleRoute.php b/services/nginx/app/routes/exampleRoute.php index 583c6b10..1f4b4d81 100644 --- a/services/nginx/app/routes/exampleRoute.php +++ b/services/nginx/app/routes/exampleRoute.php @@ -39,8 +39,9 @@ class exampleRoute // The time should be from 00:00:00 of the start date to 23:59:59 of the end date $date_end = date('Y-m-d 23:59:59', strtotime("-1 days")); // Yesterday (Sunday) at 23:59:59 $date_start = date('Y-m-d 00:00:00', strtotime("-$days days")); // $days ago at 00:00:00 - $department->sendPeriodStatisticsToSlack($date_start, $date_end); + $department->sendPeriodStatisticsToSlack($date_start, $date_end); // Sends message to "daglig-ledelse". } + $department->sendSlackInternalStatisticNotification($date_start, $date_end, $departments); } } $response->success(['message' => 'Hello World!']);