bcgov / critterbase-api

0 stars 0 forks source link

851-family-router #9

Closed GrahamS-Quartech closed 1 year ago

GrahamS-Quartech commented 1 year ago

This PR adds a router for the family tables. There's a lot going on in this one since it handles operations related to family, family_child and family_parent all in one. Basic CRUD operations are supported for all these tables for the most part, except for places where it didn't seem to make sense. family_parent and family_child for example don't really have any fields that you should be able to update. There are also routes for obtaining the immediate family of a critter id or a family id, though the format is slightly different between them. I feel that this covers the most common use case for retrieving family hierarchy information from this end point. If we need to go deeper into the family tree expansion I think that can be a separate endeavor.