Update: 2026-07-14 00:34:22

This commit is contained in:
Hamza-Ayed
2026-07-14 00:34:22 +03:00
parent c956f27230
commit a547b81b60
14 changed files with 123 additions and 81 deletions
+7
View File
@@ -12,6 +12,13 @@ $targetId = filterRequest('target_id', 'int') ?: null;
if (!in_array($targetType, ['all', 'route'])) $targetType = 'all';
// عند استهداف خط: تأكد أن الخط يخص مؤسسة هذا المشرف — يمنع البث لخط مؤسسة أخرى
if ($targetType === 'route' && $targetId) {
$chkRoute = $transit_con->prepare("SELECT id FROM transit_routes WHERE id=? AND org_id=? LIMIT 1");
$chkRoute->execute([$targetId, $transit_org_id]);
if (!$chkRoute->fetch()) jsonError('Route not found or access denied', 404);
}
$fcmTopic = ($targetType === 'route' && $targetId)
? transitRouteTopic($targetId)
: transitOrgTopic($transit_org_id);