This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\ExameImagem;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ExceededCotaAgendamentoException extends Exception
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return response()->json(
|
||||
json_decode(json_encode(['requires_supervisor' => true]), true),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
}
|
||||
17
api/app/Exceptions/ExameImagem/ExceededJornadaException.php
Normal file
17
api/app/Exceptions/ExameImagem/ExceededJornadaException.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\ExameImagem;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ExceededJornadaException extends Exception
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return response()->json(
|
||||
json_decode(json_encode(['requires_supervisor_jornada' => true]), true),
|
||||
Response::HTTP_OK
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\ExameImagem;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ExceededVagaJornadaException extends Exception
|
||||
{
|
||||
|
||||
public function render()
|
||||
{
|
||||
return response()->json([
|
||||
'message' => 'Número de vagas atingido.'
|
||||
], Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\ExameImagem;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ProtocoloFechamentoException extends Exception
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->message = 'Existe(m) protocolo(s) de fechamento não informado(s) e/ou inválido(s).';
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return response()->json(['message' => $this->message], Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user