refs #624. Added ogAgent controller API
parent
16e3168c3c
commit
7e84855117
|
@ -28,12 +28,12 @@ class OgAdmClientController extends AbstractController
|
|||
|
||||
$responseData = [
|
||||
'res' => 1,
|
||||
'ido' => $data['ido'],
|
||||
'npc' => $data['npc'],
|
||||
'ido' => $data['ido'] ?? null,
|
||||
'npc' => $data['npc'] ?? null,
|
||||
'che' => 42,
|
||||
'exe' => 42,
|
||||
'ida' => $data['ida'],
|
||||
'idc' => $data['idc']
|
||||
'ida' => $data['ida'] ?? null,
|
||||
'idc' => $data['idc'] ?? null,
|
||||
];
|
||||
|
||||
return new JsonResponse($responseData, Response::HTTP_OK);
|
||||
|
@ -130,7 +130,6 @@ class OgAdmClientController extends AbstractController
|
|||
}
|
||||
}
|
||||
|
||||
// Simula que el cliente existe
|
||||
if (!$this->clienteExistente($data['iph'])) {
|
||||
return new JsonResponse(['message' => 'Client not found'], Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
@ -140,13 +139,11 @@ class OgAdmClientController extends AbstractController
|
|||
|
||||
private function clienteExistente($iph)
|
||||
{
|
||||
// Simula que el cliente existe
|
||||
return true;
|
||||
}
|
||||
|
||||
private function buscaComandos($ido)
|
||||
{
|
||||
// Simula obtener comandos pendientes
|
||||
return ['nfn' => 'popup', 'title' => 'my title', 'message' => 'my message', 'ids' => 42];
|
||||
}
|
||||
}
|
|
@ -353,7 +353,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
|||
'type' => 'string',
|
||||
],
|
||||
],
|
||||
'required' => ['iph', 'ido', 'npc', 'idc', 'ida', 'cfg'],
|
||||
'required' => ['iph', 'cfg'],
|
||||
])))
|
||||
]))
|
||||
->withRequired(true)
|
||||
|
@ -401,7 +401,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
|||
'type' => 'string',
|
||||
],
|
||||
],
|
||||
'required' => ['iph', 'ido', 'npc', 'idc', 'ida', 'exe'],
|
||||
'required' => ['iph', 'exe'],
|
||||
])))
|
||||
]))
|
||||
->withRequired(true)
|
||||
|
@ -480,7 +480,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
|||
'type' => 'string',
|
||||
],
|
||||
],
|
||||
'required' => ['iph', 'ido', 'npc', 'idc', 'ida', 'nfl'],
|
||||
'required' => ['nfl'],
|
||||
])))
|
||||
]))
|
||||
->withRequired(true)
|
||||
|
@ -563,7 +563,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
|||
'type' => 'integer',
|
||||
],
|
||||
],
|
||||
'required' => ['iph', 'ido', 'npc', 'idc', 'ida'],
|
||||
'required' => ['iph', 'ido'],
|
||||
])))
|
||||
]))
|
||||
->withRequired(true)
|
||||
|
@ -655,7 +655,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
|||
'type' => 'integer',
|
||||
],
|
||||
],
|
||||
'required' => ['iph', 'ido', 'npc', 'idc', 'ida', 'tpc'],
|
||||
'required' => ['iph', 'tpc'],
|
||||
])))
|
||||
]))
|
||||
->withRequired(true)
|
||||
|
|
Loading…
Reference in New Issue