Add a link betweend a gear to the connected user.

This commit is contained in:
Sébastien André
2021-02-26 15:07:31 +01:00
parent 426dcec7d9
commit 92d600dc73
8 changed files with 25 additions and 10 deletions

View File

@@ -19,7 +19,15 @@ namespace skydiveLogs_api.Data
public IEnumerable<Gear> GetAll()
{
return _col.FindAll().ToList();
throw new System.NotImplementedException();
}
public IEnumerable<Gear> GetAll(User connectedUser)
{
return _col.Include(x => x.User)
.Query()
.Where(j => j.User.Id == user.Id)
ToList();
}
public Gear GetById(int id)