Added the total of assignments to the Master Corporate

This commit is contained in:
Tiago Ribeiro
2024-08-19 23:04:13 +01:00
parent 346b131388
commit 5d191730d2
7 changed files with 55 additions and 21 deletions

View File

@@ -36,5 +36,5 @@ async function GET(req: NextApiRequest, res: NextApiResponse) {
const assigners = await getAllAssignersByCorporate(id);
const assignments = await getAssignmentsByAssigners([...assigners, id]);
res.status(200).json(assignments);
res.status(200).json(uniqBy(assignments, "id"));
}