44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?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);
|
|
}
|
|
}
|