calculo: fix pensaoalimenticia
Signed-off-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
c37a0461bf
commit
866a3fe539
3 files changed
+24
-9
No files matched your search
@@ -55,7 +55,6 @@ router.post('/', async (req, res) => {
|
||||
router.get('/:id', async (req, res) => {
|
||||
try {
|
||||
const { id } = req.params;
|
||||
|
||||
const calculo = await prisma.calculoPensaoAlimenticia.findUnique({
|
||||
where: { id },
|
||||
include: {
|
||||
@@ -70,11 +69,9 @@ router.get('/:id', async (req, res) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!calculo) {
|
||||
return res.status(404).json({ error: 'Cálculo não encontrado' });
|
||||
}
|
||||
|
||||
res.json(calculo);
|
||||
} catch (error) {
|
||||
console.error('Erro ao buscar cálculo:', error);
|
||||
|
||||
Reference in new issue
Block a user