This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Mobile\ConectaCidadao\Termos;
|
||||
|
||||
use App\Enums\Mobile\ConectaCidadao\TermoTipo;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Mobile\ConectaCidadao\Termos\TermoService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class TermoController extends Controller
|
||||
{
|
||||
public function politicaCidadao()
|
||||
{
|
||||
$termo = TermoService::getAtivoByTipo(TermoTipo::TERMO_USO);
|
||||
|
||||
return view('conectasus-cidadao.politica-conectasus-cidadao', compact('termo'));
|
||||
}
|
||||
|
||||
public function ativo()
|
||||
{
|
||||
return response()->json(TermoService::getAtivo(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
return response()->json(TermoService::getById($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function pendentes()
|
||||
{
|
||||
return response()->json(TermoService::getPendentes(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function aceitar($id)
|
||||
{
|
||||
return response()->json(TermoService::aceitar($id), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function aceitacoes()
|
||||
{
|
||||
return response()->json(TermoService::getAceitacoes(), Response::HTTP_OK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user