Beispiel #1
0
    $demandsResult = Demands::deleteAgentDemands($id);
    $trackedAssetsResult = TrackedAssets::deleteAgentTrackedAssets($id);
    $lidsResult = Lids::deleteAgentLids($id);

    if ($agentResult['status'] == -1)
        $response->json($agentResult);

    if ($logsResult['status'] == -1)
        $response->json($logsResult);

    if ($notificationsResult['status'] == -1)
        $response->json($notificationsResult);

    if ($conversationsResult['status'] == -1)
        $response->json($conversationsResult);

    if ($demandsResult['status'] == -1)
        $response->json($demandsResult);

    if ($trackedAssetsResult['status'] == -1)
        $response->json($trackedAssetsResult);

    if ($lidsResult['status'] == -1)
        $response->json($lidsResult);

    $response->json(Result::success('Agent removed successfully.'));
});*/
$this->respond(['GET', 'POST'], '/get/all', function ($request, $response, $service, $app) {
    $result = Agents::getAllAgents();
    $response->json(Result::success('', $result));
});