location endpoints

This commit is contained in:
Hayden 2022-08-30 21:22:01 -08:00
parent 9583847f94
commit c7cfb4335b
10 changed files with 395 additions and 51 deletions

View file

@ -21,6 +21,7 @@ func (r *EntLocationRepository) Get(ctx context.Context, ID uuid.UUID) (*ent.Loc
func (r *EntLocationRepository) GetAll(ctx context.Context, groupId uuid.UUID) ([]*ent.Location, error) {
return r.db.Location.Query().
Where(location.HasGroupWith(group.ID(groupId))).
WithGroup().
All(ctx)
}