forked from mirrors/homebox
location endpoints
This commit is contained in:
parent
9583847f94
commit
c7cfb4335b
10 changed files with 395 additions and 51 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue